VBA/Excel/Access/Word/Excel/Chart Export
Версия от 16:33, 26 мая 2010; (обсуждение)
Creates web page with interactivity from an embedded chart
Sub SaveChartWeb()
ActiveWorkbook.PublishObjects.Add _
SourceType:=xlSourceChart, _
Filename:=ActiveWorkbook.Path & "\Sample2.htm", _
Sheet:=ActiveSheet.name, _
Source:=" Chart 1", _
HtmlType:=xlHtmlChart
ActiveWorkbook.PublishObjects(1).Publish (True)
End Sub
exports the active chart as a GIF file:
Sub ExportChart()
Dim myChart As Chart
Set myChart = ActiveChart
myChart.Export Filename:="C:\Chart.gif", Filtername:="GIF"
End Sub