Code covered by the BSD License  

Highlights from
XLSWriteMex

4.83333

4.8 | 7 ratings Rate this file 5 Downloads (last 30 days) File Size: 38.5 KB File ID: #4599

XLSWriteMex

by Gordon Ray

 

09 Mar 2004 (Updated 24 Mar 2004)

MATLAB MEX function to create an Excel spreadsheet.

| Watch this File

File Information
Description

Functionally the same xlswrite.m (by Scott Hirsch), the only difference is in the implementation.

XLSWriteMex is implemented in C++ and compiled into a MATLAB MEX dll. I did this because 'xlswrite.m' does not compile using the MATLAB compiler, so any MATLAB program using 'xlswrite.m' cannot be compiled into a stand-alone app.

Using XLSWriteMex instead of xlswrite will solve this problem.

Example using XLSWriteMex:
m = rand(100,4);
header = 'This is some introductory information at the top of my spreadsheet.';
colnames = {'Ch1','Ch2','Ch3','Ch4'};
filename = 'myfile.xls';
XLSWriteMex(m,header,colnames,filename);

Will create a spreadsheet named myfile.xls

Acknowledgements

Xlswrite inspired this file.

This file inspired Example Of How To Save Or Read Data To An Excel Archive..

MATLAB release MATLAB 6.5 (R13)
Other requirements Microsoft Excel
Tags for This File  
Everyone's Tags
data export, data import, dll, excel, mex, spreadsheet, write
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (10)
26 May 2011 Daniele

It's not clear how the DLL should be loaded. Where does the file/folder need to be placed? Does it need to be loaded with 'loadlibrary'? Please include a readme file with instructions. Thanks

11 Oct 2010 Mechanical Design Engineering Mohamed

Where to paste this file??
i have an error undefined function or command

17 Feb 2010 George

Is there a way to use the functionality of the built in xlswrite function with this file?
Instead of "XLSWriteMex(m,header,colnames,filename)"
is there a way to use "xlswrite(File,data,sheet,location)" in a compiled version?

16 Jun 2008 Liaquat Iqbal  
30 Mar 2008 Wan an Cui

Very good! If the author can add path to the created file,it will be more excellent.
For example, I hope the created file in "D:\mywork\Matlab",but I do not know how to realize it. Thanks the author.

30 Mar 2008 Wan an Cui  
30 Mar 2008 Wan an Cui

very good!

10 Dec 2004 Garner Zuir

Interesting and useful

17 Oct 2004 Jean Ghanem

Very nice

15 Apr 2004 martyn dorey

Nice

Updates
24 Mar 2004

Changed category from
'Utilities: Miscellaneous' to
'Utilities: Data Import/Export'

Contact us