Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

Macro Issue

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

1 Reply
marcus_sommer

Try this:

For i = 0 to  ubound(myCharts)

     SET  objChart = ActiveDocument.GetSheetObject(myCharts(i))

     objChart.Export "C:\" & myCharts(i) & ".CSV", ", "

Next


- Marcus