xlswrite
io · scripts/io/xlswrite.m
XLSWRITE Write an array to a spreadsheet file (MATLAB compatible).
XLSWRITE (FILE, A), XLSWRITE (FILE, A, SHEET), XLSWRITE (FILE, A, SHEET, RANGE)
XLSWRITE (FILE, A, RANGE)
Compatibility wrapper matching MATLAB R2026a signatures and outputs.
.xlsx workbooks are written with the same native OOXML backend that
writematrix uses (no Excel required). .csv/.txt/.dat files go through
writematrix or writecell. SHEET is a name or 1-based index (default:
the first sheet), RANGE an A1-style range of which the top-left cell is
the origin of the data. Existing workbooks are updated in place.
NaN is written as an empty cell.
STATUS is true on success. When outputs are requested, MESSAGE is a
struct with fields message and identifier (empty strings on success);
on failure STATUS is false and MESSAGE holds the error, otherwise an
error is raised.
Legacy binary .xls workbooks are not supported for writing (use .xlsx).
A bare filename with no extension defaults to .xlsx (MATLAB defaults to
.xls on Windows with Excel; Nexus writes OOXML natively).