ANY2CSV

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

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

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.

Cite As

Felix Zoergiebel (2026). ANY2CSV (https://www.mathworks.com/matlabcentral/fileexchange/19149-any2csv), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

New feature: struct fields can be arranged vertically or horizontally. Setting in line 128
New feature: horz. and vert. distance between subscript/fieldname and content of cell/structfield can be set in line 127
Thanks Jiro Doke for your comments!