Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
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 ExportBitmapToFile
GraphPath = "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...
Thanks!
Best regards
Torbjörn Ungvall (@Ungvall)
Senior Business Discovery Manager @ Advectas AB
Hi Torbjörn,
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?
Regards,
Stephen
Hi Torbjörn,
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?
Regards,
Stephen
Hm...
Had to change the path and rewrite end sub - then it worked...
Thanks!
Best regards
Torbjörn Ungvall (@Ungvall)
Senior Business Discovery Manager @ Advectas AB
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.