Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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