フィルターのクリア

publish excel as web page

4 ビュー (過去 30 日間)
Saulius
Saulius 2015 年 2 月 5 日
編集済み: zhichuan wang 2018 年 9 月 20 日
I want to publish excel file as web file. Beggining:
Excel = actxserver('Excel.Application');
WB = Excel.Workbooks.Open(fileResult,0,false);
If I use 'save as' function it creates single .htm file
WB.SaveAs('C:\xxx\result.htm')
I need to save as full web page so that .htm file and ALSO a folder containing files filelist.xml, sheet001.htm, sheet002.htm, ... , stylesheet.css, tabstrip.htm would be created (just like saving excel file as web page). I assume PublishObjects should be used. However this gives an error:
WB.PublishObjects.Add('xlSourceRange','C:\xxx\result.htm')
What is a correct code? I want to save all workbook with all sheets to a web page type.
In this link: explanation in vba is example how to publish excel, however it is not in a matlab syntax and I can't find a way to make this code work...
  1 件のコメント
zhichuan wang
zhichuan wang 2018 年 9 月 20 日
編集済み: zhichuan wang 2018 年 9 月 20 日
PublishObjects.Add Method (Excel) gives the method to save Excel as .html file.
WB.PublishObjects.Add('xlSourceSheet','C:\xxx\result.htm',SheetName)
For example:
Workbooks.Item(1).PublishObjects.Add('xlSourceSheet','SelfTestState.html'],'Test_1')

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

回答 (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