Excel Chart - HTML/Publish

IanC74

Member
Hi

I have created a chart in excel from progress and i need to save this as a html.

Ive added the publish objects line:

vchWorkBook:publishObjects:ADD(xlSourceChart,"C:\web1.htm","Sheet1","Chart1",xlHtmlStatic,"xx","").

Yet this does not create the c:\web1.htm file.

I see from doing a macro of the same process in excel there would be another line Publish(true):

With ActiveWorkbook.PublishObjects.Add(xlSourceChart, "C:\webtest-sop.htm", _
"Sheet1", "Chart 2", xlHtmlStatic, "webtest-sop_3957", "")
.Publish (True)
End With


But does anyone know how I code for this?


Help much Appreciated.
 

sphipp

Member
The easiest way would be to use save-as and choose the HTML format.

Workbooks:Item(1):SaveAs("C:\web1.htm",44,,,,,).

If you want to extract the charts as images or need to change the paths of the charts or whatever, you can read the HTML code and extract whatever information you want. I'd open it in a text-editor first to see the format and then use Progress to extract the relevant information.
 
Top