View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

4.0 | 6 ratings Rate this file 12 Downloads (last 30 days) File Size: 4.38 KB File ID: #19149 Version: 1.0
image thumbnail




11 Mar 2008 (Updated )

Exports any type of MATLAB data to a nicely formated csv-file

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information

Exports any type of MATLAB data to a nicely formated csv-file, including fieldnames of structs and any multidimensional subscript-indices.
This tool is especially useful if you want to save the content of large structs and cell-arrays to an excel or ods sheet. Any to csv works recursively until all the content of a complicated object is written to a csv-spreadsheet and opens it in the standard csv application. There you can save it to e.g. xls or ods.

MATLAB release MATLAB 7.4 (R2007a)
Other requirements Opening the csv-file after creation only works on os x and windows.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
01 Apr 2014 Michael Wengler

This does not work with a structure that has nested field names.

Comment only
30 Oct 2012 Franck Dernoncourt

MATLAB 2012a, <1305983x3 cell>, sucked all my RAM, I ended up using instead

15 Jun 2012 Hugh

Hugh (view profile)

04 Apr 2011 Kshitij Gupta

very useful

01 Dec 2010 Oren Schaedel

Thanks, very useful

Comment only
19 May 2010 Larissa

Hi Felix,
Could you please have a look at this thread?
I am out of memory in 2009b. What could be a reason for that?

Comment only
10 Nov 2009 sophie neve

very useful !!
but I find the opening of excel annoying
I also got a (little) problem when creating the file, it says :
The system cannot find the file ''pathname''
normal it does not found... has not been created yet....


09 Apr 2009 Joachim

Very usefull work ( see comment from Steffen).

14 Mar 2009 Steffen

Steffen (view profile)

This is a great way to manage the workflow of your data from Matlab to any office-programm like excel or openoffice. It's handy and easy to use.

23 Nov 2008 Felix Zoergiebel

I am using instead of Microsoft Office. has a very nice import function for csv files. Once the file is imported you can save as XLS. I know that those functions are available via command-line tools, however I do not remember the names and I have never used them.

Comment only
10 Nov 2008 Puifai S

Do you know of a way to convert from CSV to XLS quickly?

Comment only
11 Mar 2008 Felix Zörgiebel

Shame on me, I should have tested that case... Thanks Urs, I corrected the bug. Felix

Comment only
11 Mar 2008 Urs (us) Schwarz

does NOT work with empty cell entries, eg,

Comment only
12 Mar 2008

The empty cell bug is now finally gone.

27 May 2008

- display struct fields horizontally or vertically -> line 128
- display content of cell/struct fields under or right to the subscripts/fieldname -> line 127

Thanks Jiro Doke for those two ideas!

- removed empty struct bug

Contact us