xlwrite : Export Data to Excel from Matlab on Mac/Win

版本 1.2.0.0 (665.3 KB) 作者: Marin Deresco
xlwrite allows you to export data (2d/3d arrays of double/cell) to Excel from Matlab (Mac/Win)
8.7K 次下载
更新时间 2012/8/3

查看许可证

The function xlwrite has similar syntax and inputs as MatLAB's xlswrite.
It also can write 3-d arrays (xlswrite can't), of cell and double type. To simplify the idea : we forward Matlab data to be exported to a Java function which in turn writes the data to excel.

Note that data to be exported is converted to cell then to java String array.

This workaround is a real working solution, it may need further refinements :
- manage Java heap space, as Java heap memory saturates for large arrays exported many times.
- format dates and strings, as all numbers appear as text in Excel.

Matlab's decimal separator is '.' : in order to be able to work with exported data, users of this solution will have to change Mac preferences regarding the decimal separator (should be ".").
To do so you need to go to System Preferences > International > Formats and click on Customize button in number zone, then type '.' in the field required.
This solution works under Windows.

Test_xlwrite.m contains an example.

引用格式

Marin Deresco (2024). xlwrite : Export Data to Excel from Matlab on Mac/Win (https://www.mathworks.com/matlabcentral/fileexchange/37560-xlwrite-export-data-to-excel-from-matlab-on-mac-win), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Spreadsheets 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.2.0.0

According to a user remark, I've updated the description of xlwrite : I've replaced 'same syntax' into 'similar syntax'.

1.1.0.0

updated the summary

1.0.0.0