I am running a system that uploads data periodically to an excel chart. I want to publish this chart onto a website and have it automatically be updated to the website at the same rate that the data is updated in the excel file. I have started by using this VBA macro:
<o></o>
<o>Sub Autpen()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o> </o>ThisWorkbook.PublishObjects.Add(xlsSourceChart, _<o></o>
"C:\Documents and Settings\jdallas\Desktop\Testing\chart.html" _<o></o>
, "Sheet1", "Chart 2", xlHtmlStatic, "DevXSample_16365", _<o></o>
"Graph1").Publish (True)<o></o>
Application.OnTime Now + TimeValue("00:00:30"), _<o></o>
"Autpen"<o></o>
End Sub<o></o>
</o>
I have 2 questions:
1. I am trying to publish a specific chart to an HTML file, but no matter what I put into the fields for "Sheet1" or "Chart2", excel always publishes the entire workbook. How can I only publish an HTML file of the chart I want and nothing else?
2. How can I automatically have this chart html file updated to a website?
Thanks so much.
<o></o>
<o>Sub Autpen()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o> </o>ThisWorkbook.PublishObjects.Add(xlsSourceChart, _<o></o>
"C:\Documents and Settings\jdallas\Desktop\Testing\chart.html" _<o></o>
, "Sheet1", "Chart 2", xlHtmlStatic, "DevXSample_16365", _<o></o>
"Graph1").Publish (True)<o></o>
Application.OnTime Now + TimeValue("00:00:30"), _<o></o>
"Autpen"<o></o>
End Sub<o></o>
</o>
I have 2 questions:
1. I am trying to publish a specific chart to an HTML file, but no matter what I put into the fields for "Sheet1" or "Chart2", excel always publishes the entire workbook. How can I only publish an HTML file of the chart I want and nothing else?
2. How can I automatically have this chart html file updated to a website?
Thanks so much.