Write data to Excel

Write matrix to Excel-file, and leave the files open. File written to is not saved.
1K Downloads
Updated 14 Sep 2012

View License

Write to an Excel-file. If file not excist, the file is created based on user input in the filename(xls, xlsx, xlsm...).

If the sheet not excist, the sheet is created. Range can be given as single cell, and the function calculate what range to write to. Otherwise the absolut range that fits the matrix size must be given in.

Default is that file is on current path, if optional path-values is given file is open outside the path, and created if not excist allready.

Comments are hastly translate an error control is done to some exstent.

Cite As

Gunnar Aronsen (2024). Write data to Excel (https://www.mathworks.com/matlabcentral/fileexchange/31105-write-data-to-excel), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.4.0.0

Corrected the file so it start Excel if not open. This was not included in the last function.

1.3.0.0

File to write does not need to be active Excel file, function select correct file.

1.1.0.0

New upload 03-May-2012
Second upload comment:
Error reporte 02-May-2012 corrected.

1.0.0.0