Writematrix without autofi column width

조회 수: 11 (최근 30일)
Dwight Schrute III
Dwight Schrute III 2019년 6월 6일
답변: Walter Roberson 2019년 6월 6일
When I use writematrix to paste a matrix into an Excel file, the column widths are then adjusted to autofit the length of the pasted matrix. Is there a way to prevent this from happening, i.e., to retain the original Excel column width prior to pasting?

채택된 답변

Walter Roberson
Walter Roberson 2019년 6월 6일
No, not using writematrix() . The widths are controlled by metadata about the cells that writematrix() makes no attempt to control.
In order to control the widths, you would need to be using MS Windows with Excel installed, and you would have to use activex to connect to excel and give it commands to control the cell formatting.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by