Discussion Board for collaboration on QlikView Scripting.
I need a simple macro for exporting objects to a .jpg. Customer needs to publish objects on a Intranet (EPiServer)...
Something like this would be helpful:
sub ExportBitmapToFileGraphPath = "X:\Development\Export\"ActiveDocument.GetSheetObject( "CH115").ExportBitmapToFile GraphPath & "B.jpg"ActiveDocument.GetSheetObject( "CH116").ExportBitmapToFile GraphPath & "C.jpg"end sub
But this doesn't wotk, and I'm not a developer...
Torbjörn Ungvall (@Ungvall)
Senior Business Discovery Manager @ Advectas AB
Go to Solution.
I pasted your code into a demo document, change the path and the CH numbers and it worked for me!
Is the path OK? Write Access, etc? Can you manually export the images by right-clicking on the chart to that location?
Had to change the path and rewrite end sub - then it worked...
You could write up a vbscript like this,
set Qv = CreateObject("QlikTech.QlikView")set Doc = Qv.OpenDoc ("C:\test.qvw","","")Doc.GetSheetObject("CH01").ExportBitmapToFile "C:\B.jpg"Doc.GetSheetObject("CH02").ExportBitmapToFile "C:\C.jpg"
Schedual it in windows. You might also need to add a Desktop folder to C:\Windows\SysWOW64\config\systemprofile\ to workaround the head less session issue.
Be aware that this will consume a CAL.