フィルターのクリア

Invoke 'SaveAs' in excel to save sheet as '.htm' format.

8 ビュー (過去 30 日間)
Himanshu Verma
Himanshu Verma 2021 年 11 月 8 日
回答済み: Cris LaPierre 2021 年 11 月 11 日
I'm using ActxServer to write some content to an excel sheet and add images to it in different tabs. If I manually use 'SaveAs' option in excel, the sheet can be saved as '.htm' file. But I want to invoke the same function and save my excel sheet as a '.html' file using ActxServer. How to do that?

回答 (1 件)

Cris LaPierre
Cris LaPierre 2021 年 11 月 11 日
I found this answer from 2009 that gives insight into how to do this. The optional variant argument "43" is used to specify an older version of MATLAB.
Knowing that, you can use this table to find the correct value for the format you desire. For xlHtml, it is 44.
The final code should look something like this
workbook.SaveAs('filename.htm',44);

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by