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: 
chrisg
Partner - Creator III
Partner - Creator III

How to build PPTs?

Hi,

i would like to build up PowerPoints (PPT) out of QlikView and i am looking for an example or an idea how to do his. (How to copy an opject with a marco to a folder and then paste that into in PPT-File?)

Thx

Chris

Do or Do Not. There is no try!
7 Replies
johnw
Champion III
Champion III

It depends on what you're after. If you want interactive QlikView objects, it's supposed to be drag and drop simple.

At our shop, that wasn't what the users wanted. They wanted static images that nobody could mess with and that didn't require network connectivity. While we don't have it fully automated yet, I think we have the basics of the process. And all credit goes to Rob Wunderlich for what we have so far, both for the ideas and for writing the code. Just as a high level overview, I build QlikView charts that display what the users want to see, an export list table in my script links up object IDs to image names, then I run a Visual Basic script to export the images, then I put them in the PowerPoint using the insert object functionality. We intend to automate the whole process, but haven't yet.

I can go into more details if it's what you're looking for, and if Rob doesn't consider it a trade secret or something, but I think most people are after interactive QlikView objects instead of static images.

Not applicable

I recollect somewhere in this forum about using inserting QLIK OCX Control as a new file in PPT.

Regards

Eraaj

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

You can simply drag the object and drop it in PPT. In order to be able to do it, you need to have the IE Plugin installed (even if you have the Developer installed, you still need to install the Plug-in as well).

Oleg

disqr_rm
Partner - Specialist III
Partner - Specialist III

Here is little better code:

sub ppt
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True ' Create a presentation
Set PPPres = PPApp.Presentations.Add

set s=ActiveDocument.Sheets("Main")
charts=s.GetGraphs
for i=lbound(charts) to ubound(charts)
Set PPSlide = PPPres.Slides.Add(1, 1)
PPSlide.Shapes(1).Delete ' removes the title
PPSlide.Shapes(1).Delete ' removes the text box
ActiveDocument.GetSheetObject(charts(i).getobjectid).CopyBitmapToClipboard
PPSlide.Shapes.Paste
next

PPPres.SaveAs "C:\f1\MyPresentation.ppt"
PPPres.Close
PPApp.Quit
Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing
end sub

burgersurfer
Contributor III
Contributor III

Thanks Rakesh, this code worked great for me. I can now export numerous charts to PPT and distribute.

Not applicable

Hi Rakesh,

Thanks for this code, it is really helpful. I noticed that you use ActiveDocument.GetSheetObject(charts(i).getobjectid).CopyBitmapToClipboard
for charts and can use ActiveDocument.GetSheetObject(TextObj(i).getobjectid).CopyBitmapToClipboard for text objects. Do thngs like pivot tables. straight tables and table boxes fall under the textObj category or is there a separate way to define these?

If you could clear this up it would be much appreciated.

Thanks,

Not applicable

Hi guys,

I have created a macro (with alot of help fro this post) which exports a number of charts from one tab in Qlikview to one slide in Powerpoint. However, I've encountered a problem which I am unsure on how to solve. As you can see below I have referenced a tab Risk&Control. The export function works fine when the button is located on the Risk&Control Page. However, when the button is on a different tab it seems to look at the first object on the Risk&Control page and do a loop on this, pasting the same object about 10 times!? Would anyone know why this may be the case?

This also occurred when I tried to add another page to the code and paste objects from a different tab. Any thoughts on this would be very much appreciated as I can't see what the problem is at present.

Thanks in advance!

...macro code

sub ppt
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True ' Create a presentation
Set PPPres = PPApp.Presentations.Add
set s=ActiveDocument.Sheets("Risk&Control")
charts=s.GetGraphs
Textobj = s.GetTextObjects
Set PPSlide = PPPres.Slides.Add(1, 1)
for i=lbound(charts) to ubound(charts)

ActiveDocument.GetSheetObject(charts(i).getobjectid).CopyBitmapToClipboard
PPSlide.Shapes.Paste

next


for f=lbound(Textobj) to ubound(Textobj)
ActiveDocument.GetSheetObject(Textobj(f).getobjectid).CopyBitmapToClipboard
PPSlide.Shapes.Paste
next
PPPres.SaveAs "\\server\File.ppt"
Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing
end sub