xlswrite
by Scott Hirsch
13 Dec 2002
(Updated 04 Jan 2010)
Easily create a Microsoft Excel format spreadsheet from MATLAB®.
|
Watch this File
|
| File Information |
| Description |
NOTE: The MathWorks added similar functionality to MATLAB 7. You may want to check out the built in xlswrite before trying mine. - Scott
Creates a Microsoft Excel format spreadsheet using the MATLAB ActiveX interface. This can also open the spreadsheet directly without ever saving to a file.
Nothing too fancy:
- Supports arbitrary number of header lines
- Supports column headers
- Writes a single matrix
- Can write to specific sheets (thanks Fahad!)
Example:
m = rand(100,4);
header = 'This is some introductory information at the top of my spreadsheet.';
colnames = {'Ch1','Ch2','Ch3','Ch4'};
filename = 'myfile.xls';
xlswrite(m,header,colnames,filename);
Will create a spreadsheet named myfile.xls |
| Acknowledgements |
This submission has inspired the following:
xlschart, XLSWriteMex, xlsheets, xlswrite, table2word, dat2xls, xlswrite_mod, xlcolumn, Example of how to save or read data to an Excel archive.
|
| MATLAB release |
MATLAB 6.5 (R13)
|
| Other requirements |
Microsoft Excel spreadsheet software |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (45) |
| 26 Dec 2002 |
Saurabh Singal
|
|
|
| 03 Jan 2003 |
B Donley
|
|
|
| 19 May 2003 |
M. S.
|
|
|
| 20 May 2003 |
Hein Hardy
|
|
|
| 27 May 2003 |
J S
|
|
|
| 11 Jun 2003 |
ken stessens
|
|
|
| 13 Jun 2003 |
Femi Omitaomu
|
|
|
| 23 Jun 2003 |
Billot adrien
|
|
|
| 15 Jul 2003 |
Chris Patscheck
|
|
|
| 23 Oct 2003 |
Moti Huber
|
|
|
| 31 Oct 2003 |
rajneesh agrawal
|
|
|
| 17 Nov 2003 |
Evaristo Hernández
|
|
|
| 25 Jan 2004 |
John Muller
|
|
|
| 25 Feb 2004 |
pong tor
|
|
|
| 02 Mar 2004 |
M LG
|
|
|
| 04 Mar 2004 |
Eric Altshuler
|
|
|
| 31 Mar 2004 |
Fahad Al Mahmood
|
|
|
| 06 Apr 2004 |
Rob Morse
|
|
|
| 29 Apr 2004 |
Uday Desai
|
|
|
| 18 May 2004 |
terry wu
|
|
|
| 05 Jul 2004 |
mathieu jerome
|
|
|
| 20 Jul 2004 |
Omri Barak
|
|
|
| 21 Jul 2004 |
Ted Maddess
|
|
|
| 02 Nov 2004 |
Anadi Mahajan
|
|
|
| 18 Feb 2005 |
Brad Hicks
|
|
|
| 01 Mar 2005 |
Michael Kleder
|
|
|
| 23 Mar 2005 |
Dimitri Shvorob
|
|
|
| 25 Apr 2005 |
Dimitri Shvorob
|
|
|
| 02 Jun 2005 |
tiago duperray
|
|
|
| 19 Aug 2005 |
zmeb olivier
|
|
|
| 10 Nov 2005 |
Santosh Pandey
|
|
|
| 23 Feb 2006 |
vijay krishna
|
|
|
| 07 Sep 2006 |
Mark Hayworth
|
|
|
| 08 Nov 2006 |
Moji Muda
|
|
|
| 29 Mar 2007 |
Mohammed JADOUI
|
|
|
| 08 Jun 2007 |
LAKISHA GUINN
|
|
|
| 09 Sep 2007 |
Matthieu Baudry
|
|
|
| 21 Sep 2007 |
Laura Woodworth
|
|
|
| 02 Jan 2008 |
Chandra B K
|
|
|
| 06 Apr 2008 |
D R
|
|
|
| 17 Oct 2008 |
djr djr
|
|
|
| 20 Aug 2009 |
Xavier
|
|
|
| 10 Nov 2009 |
sophie neve
|
|
|
| 07 Jan 2010 |
Scott Hirsch
|
|
|
| 27 Aug 2011 |
mohamed eltahan
|
|
|
| Updates |
| 19 Jun 2003 |
Fix stupid error in documentation |
| 05 Apr 2004 |
Incorporates fixes and enhancements provided in modified versions submitted to MATLAB Central. Much thanks to the contributing authors!
Fix for >=52 columns (xlswrite_mod)
Can now write to a specific sheet (xlswrite2) |
| 07 Apr 2004 |
Oops - uploaded wrong file! |
| 08 Sep 2006 |
Fix bug in how I compute column names. Thanks to Mark Hayworth for both finding and fixing the bug. |
| 04 Jan 2010 |
minor changes to description and summary |
|
Contact us at files@mathworks.com