I have a spreadsheet which has a graph in it
If I open it in Excel and 'Save as html' it goes though a four-stage wizard and ends up with an html file and the graph saved as a gif
I want to be able to automate this in a VB app
Any ideas?
Thanks
Printable View
I have a spreadsheet which has a graph in it
If I open it in Excel and 'Save as html' it goes though a four-stage wizard and ends up with an html file and the graph saved as a gif
I want to be able to automate this in a VB app
Any ideas?
Thanks
Will Excel be installed on the computer that your code runs on?
If so the easiest way would be to use automate it - see my Excel tutorial (link in my signature) for an explanation of how to do that, particularly the "macro's" section.
Excel will be on the PC
I tried to record a macro but no code was created when saving as html
(I was able to create a simple macro ok as in your example though)
Any ideas?
Thanks
What is the office version that you are using?
I tried this in Off - 2007 and got this macro...
Rest I am sure you will be able to pick up from Si's tutorial on Excel...Code:With ActiveWorkbook.PublishObjects.Add(xlSourceSheet, _
"C:\Book1.htm", "Sheet1", "", _
xlHtmlStatic, "Book1_4459", "")
.Publish (True)
.AutoRepublish = False
End With
I'm using '97 :)
I've managed to achieve what I wanted to do using SendKeys - not quite the silent batch process I was hoping for but at least it's [semi] automated
Not sure if the code that I gave will work with '97 but did you give it a try?