- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)