Set Column width of Excel through Matlab

10 ビュー (過去 30 日間)
Vincenzo
Vincenzo 2011 年 12 月 21 日
移動済み: Rik 2024 年 6 月 30 日
Hi, I tried to set the width of a column but i don't try..
i found a hint here:
and i simply call it (in another file which I open excel) with xlsAutoFitCol('myfile.xls','Sheet1','A:S'); but nothing change... that's what appears to me...
and what i want...
Someone can help me?

採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 12 月 21 日
Something like this.
ExcelApp=actxserver('excel.application');
ExcelApp.Visible=1;
NewWorkbook=ExcelApp.Workbooks.Open(ExcelFile);
NewSheet=NewWorkbook.Sheets.Item(1);
NewRange=NewSheet.Range('A1');
NewRange.ColumnWidth=40;
  2 件のコメント
Vincenzo
Vincenzo 2011 年 12 月 21 日
移動済み: Rik 2024 年 6 月 30 日
Great Fangjun!!
Music to my ears!!
Rik
Rik 2024 年 6 月 30 日
Minor downside: this requires Windows and Excel.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by