Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

vincent_mercelo
New Contributor

CopyBitmapToClipboard fail to copy the images displayed in a chart

Hy,

I'm trying to export a chart into PowerPoint but the CopyBitmapToClipboard doesn't seem to work well.

I chose to display images for my dimension instead of text value (using the "Advanced" option, Representation : "Info as Image").

When I right-click on the chart and paste it to PowerPoint, it works fine : the chart looks exactly like in Qlikview, with the images in the first column.

But when I do this through a macro with the CopyBitmapToClipboard method, it doesn't work : the first column contains the path to the images, not the images themselves. Which is, of course, useless for the end users.

Does anyone know anything about this ? Am I missing something obvious or is this a known issue ?

Thank you !

Vincent.

3 Replies
happydays1967
Contributor

CopyBitmapToClipboard fail to copy the images displayed in a chart

I have been spending the last 4 hours trying to solve this one with an export to Excel using a macro. it is relally the last step and it annoys me. I use the CopyBitmapToClipboard method on a Pie-chart and have tried various ways to past it into Excel. When doing this manually, it works great (caption button in chart to copy the bitmap and then just richt mouse click with paste in Excel). I even tried capturing the action in Excel with record macro, but the produced code gives the same result. Here is what I do:

if iType = 10 then

                    oExpObj.ExportBiff sTmp

....

else

                    oExpObj.CopyBitmapToClipboard

end if

....

if iType = 10 then

                    oXls.Range("A" & iRow).select

                    oMsheet.paste

else

                    oXls.Range("A" & iRow).select

                    oMsheet.Pictures.Paste.Select

                    'oMsheet.PasteSpecial

end if

And also the image pasted is minimal, whereas when I paste it manually it is the right size.....

Using QV 10.00.9061.7 SR3

Excel 2007

Any help would be greatly appreciated

happydays1967
Contributor

CopyBitmapToClipboard fail to copy the images displayed in a chart

update: the (much discussed ) scriptline:

ActiveDocument.GetApplication.WaitForIdle

might be of help. It seems sometimes the CopyBitmapToClipboard method is just too fast and tries to copy before the full image is rendered.... Worked for me so far

happydays1967
Contributor

Re: CopyBitmapToClipboard fail to copy the images displayed in a chart

update: the (much discussed ) scriptline:

ActiveDocument.GetApplication.WaitForIdle

might be of help. It seems sometimes the CopyBitmapToClipboard method is just too fast and tries to copy before the full image is rendered.... Worked for me so far

Community Browser