sbashford/excelMatlab
Why not just use xlswrite()?
When called more than ~3 times, xlswrite() is an expensive function in terms of time. excelMatlab provides a simple, optimized approach to writing Excel files when multiple calls are needed. Moreover, xlswrite() requires a string (such as 'A1:B3') representing the range of cells to write. Programmatically this is inconvenient. excelMatlab requests the row and column number of the upper left cell from which to write.
Examples
Open file called fileName and write random matrix to sheet called sheetName. The matrix will be anchored to its top left corner, specified by row 1 and column 5 (cell E1).
fullPathToFile = [pwd(), filesep(), 'fileName'];
myExcel = ExcelMatlab(fullPathToFile, 'w');
data = rand(20);
sheet = 'sheetName';
row = 1;
col = 5;
myExcel.writeToSheet(data, sheet, row, col);
Open file called fileName and read cell G8 from sheet called sheetName.
fullPathToFile = [pwd(), filesep(), 'fileName'];
myExcel = ExcelMatlab(fullPathToFile);
sheet = 'sheetName';
row = 8;
col = 7;
cellRead = myExcel.readCell(sheet, row, col);
Cite As
Seth Bashford (2024). sbashford/excelMatlab (https://github.com/sbashford/excelMatlab), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
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.
Versions that use the GitHub default branch cannot be downloaded
Version | Published | Release Notes | |
---|---|---|---|
1.1.0.0 |
|