xlwrite: Generate XLS(X) files without Excel on Mac/Linux/Win
xlwrite allows to generate '.xls' & '.xlsx' files easily without having Excel installed or using COM-objects. It generates Excel files by using the Apache POI java library. This way Excel files can be generated on any platform supporting Java, including Linux & mac.
xlwrite uses the same syntax as xlswrite, making it easy to integrate in current applications.
xlwrite supports following datatypes:
- string
- numerical
- logical/boolean
The type of data is kept in Excel: for example boolean data in matlab will be saved as boolean in Excel.
xlwrite also supports a combination of above datatypes in a cell array like for example:
xlsData = {1 true 'text' false; 10 -12.5 6 false};
To generate the Excel file without too much overhead, xlwrite interacts directly with the Apache POI library.
The original idea of this script is based on the xlwrite function written by Marin Deresco, however due to some limitations we had to write an improved version.
Although created under Matlab 2012a, xlwrite should also work for earlier versions of Matlab.
UPDATE: if you find any bugs, please contact me directly.
Cite As
Alec de Zegher (2022). xlwrite: Generate XLS(X) files without Excel on Mac/Linux/Win (https://www.mathworks.com/matlabcentral/fileexchange/38591-xlwrite-generate-xls-x-files-without-excel-on-mac-linux-win), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: xlwrite : Export Data to Excel from Matlab on Mac/Win
Inspired: xlRange, number2letter, gQSPSim, xlread, Microscopy Image Browser 2 (MIB2), csvimport(filename), csvexport(filename,cellVals), gQSPSim, Parametrize Calcium Signals
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.