Code covered by the BSD License  

Highlights from
struc2xls

5.0

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

struc2xls

by Francisco de Castro

 

30 Jan 2008 (Updated 31 Jan 2008)

STRUC2XLS Writes the contents os a structure into an Excel file

| 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
data export hamad 04 Mar 2011 04:37:14

Contact us at files@mathworks.com