5.0

5.0 | 1 rating Rate this file 113 downloads (last 30 days) File Size: 1.75 KB File ID: #18530

struc2xls

by Francisco de Castro

 

30 Jan 2008 (Updated 31 Jan 2008)

Code covered by BSD License  

STRUC2XLS Writes the contents os a structure into an Excel file

Download Now | Watch this File

File Information
Description

Slow and dirty way to save a simple structure to an Excel file with xlswrite. I did it to solve a urgent problem for a friend. Lots of improvements possible, I'm sure.

STRUC2XLS (FILE,S) writes the contents of structure S to a excel file named FILE. The name of the worksheet and the starting row and column can be specified as optional arguments.

Example:
s=struct('one',[1,2],'two',[10,20,30],'three',[100,200,300,400]);
struct2xls('s2xls',s,'Row',4,'Col','D')

Acknowledgements
This submission has inspired the following:
struc2xls
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
07 Mar 2008 Nitric Oxide

Works wonderfully! Could you post info on how to convert a structure to a text file?

17 Mar 2008 Author de Castro

NO: Have you tried to save to XLS and then, from Excel "save as" text?

Please login to add a comment or rating.
Updates
31 Jan 2008

Additional arguments: worksheet name, row and column.

Tag Activity for this File
Tag Applied By Date/Time
data import Francisco de Castro 22 Oct 2008 09:45:35
data export Francisco de Castro 22 Oct 2008 09:45:35
structure field excel Francisco de Castro 22 Oct 2008 09:45:35
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com