Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cannot Export objects to bitmap files from multiple sheets

I have a table in sheet1 and a chart in sheet2, and I want to use marco to export those 2 objects to 2 bitmap files.

I can only export the object in the active sheet but not the other sheet.

I tried to activate the sheet before export but it doesn't work

there is my code:

ActiveDocument.ActivateSheet 0

ActiveDocument.GetApplication.Refresh()

set myChart = ActiveDocument.GetSheetObject("CH01")

myChart.ExportBitmapToFile "C:\tempBMP1.bmp"

ActiveDocument.ActivateSheet 1

ActiveDocument.GetApplication.Refresh()

set myChart = ActiveDocument.GetSheetObject("CH02")

myChart.ExportBitmapToFile "C:\tempBMP2.bmp"



set myChart = nothing

Any idea? thanks!

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Try adding

ActiveDocument.GetApplication.WaitForIdle

before and after the exports.

-Rob

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Try adding

ActiveDocument.GetApplication.WaitForIdle

before and after the exports.

-Rob

Not applicable
Author

It's work now! thanks a lot!