ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving Excel WorkBook as WebPage Thru VBScript.. (https://www.excelbanter.com/excel-programming/303162-saving-excel-workbook-webpage-thru-vbscript.html)

[email protected]

Saving Excel WorkBook as WebPage Thru VBScript..
 
Hi,

I am trying to automate to save an Excel Sheet as a Webpage using VBScript called from SQL Server DTS package execution.

I tried two options,

1. Recorded Macro to SaveAsWeb Page and called this macro from VBScript as ExcelApplication.workbooks.Run(€śMacro€ť). This works fine as long as
I have pre created file. However, I need to create multiple files on the fly and I dont know how I can use macros here.

2. Other option I tried is to use ExcelApplication.activeworkbook.SaveAs (€śFilename.HTM€ť) which just renames the files as .HTM which contains garbage.
I also tried to use the above Macro code which uses ExcelApplication.activeworkbook.SaveAs FileName=€ťfile.htm€ť, fileformat=xlhtml €¦.. but this call is failing.

Could some please provide any suggestions?

Thanks in advance.



All times are GMT +1. The time now is 06:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com