Saving Excel Workbook as WebPage thru VBScript

E

ExcelNewBie

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 SaveAs>Web 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 don’t 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top