No BSD License  

Highlights from
xlswrite

3.66667

3.7 | 9 ratings Rate this file 8 Downloads (last 30 days) File Size: 7.44 KB File ID: #7881

xlswrite

by Andreas Sprenger

 

20 Jun 2005 (Updated 13 Feb 2006)

Write matrices to MS Excel file.

| Watch this File

File Information
Description

This function writes one or more matrices to one or more Excel sheets. Columnnames and header or sheetnames are possible. It is only the extension of Scott Hirsch's xlswrite.m provided earlier.
It should be possible to adapt to OpenOffice. If somebody helps me with ActiveX for OpenOffice...

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
xlswrite
This submission has inspired the following:
Example of how to save or read data to an Excel archive.

MATLAB release MATLAB 6.5 (R13)
Other requirements Microsoft Office (Excel)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (10)
27 Jul 2005 vinicius kuser  
04 Aug 2005 Pietro Garofalo

Every code which calls this routine imposes to have Ms Excel installed and I cannot impose to everyone to buy Matlab and also Excel.
Exporting to openoffice format would be wonderful!
Is there a way in which to use the same format of excel but calling openoffice for the creation?
I must write something like "openoffice.Application" ? Thanks.

22 Oct 2005 Eric Frederick

I agree with the previous comment. The ablility to write with OpenOffice would be a great enhancement to this program especially for Linux users (or for people who just avoid MS). If someone could post a workaround for this problem, it would be greatly appreciated.

10 Nov 2005 Gábor Jakab

I agree Mr. Garofalo, too. If openoffice is not implemented, it woluld be a great help even to have some description on aquiring ProgIDs.

07 Dec 2005 kaan kandemir

the problem of Scott Hirsch's file is that if ur not using english version of excel u ll have 'sheet1 does not exist' message due to the language... but with ur version it works verywell as far as i can see..
welldone:)

13 Jul 2006 Juan Carlos Morataya

The OpenOffice implementation becomes the program very useful, no doubt on that, I am currently working in this issue, any help will be appreciated

26 Jul 2006 Mark Hayworth

Good but needs improvement. Needs option to leave spreadsheet open, minimized, and visible even if they do give it a name, in case the user wants to check out the data they just poked. Also need argument to specify upper left cell of matrix - I don't always want data at cell A1 especially if I'm adding data to an existing spreadsheet (which this can't do anyway). Also need option to add to existing spreadsheet rather replace it. If file exists, and you say no to replacing it, it gives an error (and leaves Excel server running invisibly with Book1 open which gives strange behaviour the next time you use Excel) rather than exiting gracefully. One comment is wrong:
% %header{1} = 'first line'; %This will give
% %header{2} = 'second line'; % 2 header lines
 is wrong and will give errors.
Correct sample code is below - this works.
header = {'first line' 'second line'};

02 Sep 2006 ken stessens

I am frequently using this function for filling excel documents. I was wondering if there have been further attemps for making it work in the OpenOffice environment.
Unfortunately, I don't have any activeX programming skills myself...

thanks in advance!
Ken

17 Oct 2007 Jens Benecke

Using parseXML from the "xmlread" documentation in MATLAB to read the "content.xml" that is inside an OpenOffice spreadsheet document (.ods == .zip!) is slow, but it works, and without resorting to platform-specific hacks like ActiveX. Now someone just needs to convert this "tree" structure (XML) into a matrix! I would be willing to help out here, but I would need some help.

02 Sep 2008 arun sharma

It was very helpful and i found other submitted program producing error but this one was absolutely perfect in my case.

Please login to add a comment or rating.
Updates
13 Feb 2006

minor improvements: 1)Checks for number of sheets in new workbook (depends on installation)2)if filename is a cell {filename, WriteFlag} a WriteFlag > 0 indicates that an existing file may be overwritten by default

Tag Activity for this File
Tag Applied By Date/Time
data import Andreas Sprenger 22 Oct 2008 07:50:52
data export Andreas Sprenger 22 Oct 2008 07:50:52
excel export Andreas Sprenger 22 Oct 2008 07:50:52
write matrices Andreas Sprenger 22 Oct 2008 07:50:52
utilities Andreas Sprenger 22 Oct 2008 07:50:52
data Andreas Sprenger 22 Oct 2008 07:50:52

Contact us at files@mathworks.com