xlswrite2007

버전 1.0.0.0 (5.19 KB) 작성자: Travis
This greatly speeds up xlswrite when you are using it multiple times.
다운로드 수: 1.9K
업데이트 날짜: 2009/9/11

라이선스 보기

%This code increases the speed of the xlswrite and works with Excel 2007
%function when used in loops or multiple times. The problem with the original function
%is that it opens and closes the Excel server every time the function is used.
%To increase the speed I have just edited the original function by removing the
%server open and close function from the xlswrite function and moved them outside
%of the function. To use this first run the following code which opens the activex
%server and checks to see if the file already exists (creates if it doesnt):

% Excel = actxserver('Excel.Application');
% File = 'C:\Folder\File'; %Make sure you put the whole path
% if ~exist(File,'file')
% ExcelWorkbook = Excel.workbooks.Add;
% ExcelWorkbook.SaveAs(File)
% ExcelWorkbook.Close(false);
% end
% ExcelWorkbook = Excel.workbooks.Open(File);

%Then run the new xlswrite2007 function as many times as needed
%or in a loop (for example xlswrite2007(File,data,location).
%Then run the following code to close the activex server:

% ExcelWorkbook.Save
% ExcelWorkbook.Close(false) % Close Excel workbook.
% Excel.Quit;
% delete(Excel);

% This is a modern version of xlswrite1 posted by Matt Swartz in 2006, and
% as such most of these comments are copied from his original post

인용 양식

Travis (2024). xlswrite2007 (https://www.mathworks.com/matlabcentral/fileexchange/25288-xlswrite2007), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Spreadsheets에 대해 자세히 알아보기
도움

받음: xlswrite1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0