Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
lukegilligan
Contributor III
Contributor III

Exporting Graphs to Excel via Macro

Hi, I have am issue where I am exporting graphs to excel using VB code and variables.

In the attached QVW file it loops through the variables and exports the sheets required, but it will only export one sheets worth of graphs as bitmaps.


Has anyone seen anything similar to this before?

Labels (3)
1 Solution

Accepted Solutions
lukegilligan
Contributor III
Contributor III
Author

Managed to work this one out.

I am using obj.CopyBitmapToClipboard() to copy the graphs out to Excel which I have since found out will only work if the QV sheet I am copying from is active.

To ensure the sheet is active during the loop, I added the following to the start of the script:

ActiveDocument.ActivateSheet VarObj(i)

View solution in original post

1 Reply
lukegilligan
Contributor III
Contributor III
Author

Managed to work this one out.

I am using obj.CopyBitmapToClipboard() to copy the graphs out to Excel which I have since found out will only work if the QV sheet I am copying from is active.

To ensure the sheet is active during the loop, I added the following to the start of the script:

ActiveDocument.ActivateSheet VarObj(i)