- writematrix: https://www.mathworks.com/help/matlab/ref/writematrix.html
- writecell: https://www.mathworks.com/help/matlab/ref/writecell.html
- writetable: https://www.mathworks.com/help/matlab/ref/writetable.html
Use xlwrite on a specific cell of an EXcel file
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi everybody, I want to write matlab program results into an Excel file . For Windows Platform I used to use xlswrite and it works well
Example with xlswrite:
Filename='Results'; sheetName=strcat('Sheet11'); xlwrite(Filename, {'c2'},sheetName,'A7'); xlwrite(Filename, c2,sheetName,'B7');
Now, i need to get the samething with xlwrite that works for both Windows and Mac! write in the same sheet in extended mode on specific cells of an Excel file.
Thank you for your help
댓글 수: 0
답변 (1개)
Ronit
2025년 6월 10일
To write to specific cells in excel on both Windows and Mac, you should use "writematrix", "writecell", or "writetable" functions. These functions work cross-platform, including macOS and Linux.
However, unlike "xlswrite", they overwrite the entire sheet by default, so if you want to write to specific cells without deleting others, you’ll need to use "writecell" function.
Please refer to the documentation pages for the above functions for more details regarding their implementation:
I hope this helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!