Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
We are using below macro for taking all chart data in CSV file
UB ExportChartToCSV
Dim myCharts(2)
myCharts(0) = "Coat"
myCharts(1) = "Suit"
myCharts(2) = "Boxes"
For Each item In myCharts
SET objChart = ActiveDocument.GetSheetObject(item)
objChart.Export "C:\" & item & ".CSV", ", "
Next
END SUB
But problem is that it is not working properly and only gives csv file for first chart not for remaining charts.
Can you please suggest on this.
Thanks
Try this:
For i = 0 to ubound(myCharts)
SET objChart = ActiveDocument.GetSheetObject(myCharts(i))
objChart.Export "C:\" & myCharts(i) & ".CSV", ", "
Next
- Marcus