Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bradshields
Partner - Creator
Partner - Creator

export image of sheet as jpg

I want to export an image of the dashboard page as a .jpg!

I have written the following macro


sub Image
call Dashboard
ActiveDocument.Sheets("Dashboard").ExportBitmapToFile "M:\QlikView\BESydney\Latest Dashboard.jpg"
'ActiveDocument.Save
end sub


I call the macro using onpostreload and all works well for a user initiated reload. If I change to OnOpen as the macro trigger the users using server cannot open the model.

This model is however reloaded via a batch file using /r - this results in the image not being exported correctly - the image shows a greyed out image of where the objects are but not the actual guages.

a /l reload works fine but leaves qlikview open and unsaved which is no good for me. the last line of my macro saves the document but it still does not save.

I tried to use an extra line in the batch file to kill Qv.exe using taskkill /IM Qv.exe but the batch stalls because QlikView does not close using /l and thus the taskkill is never executed.

Does anyone have any suggestions?

17 Replies
Not applicable

Hi johannes

thanks for helping me.

very very thanks.............................................................................

Regards

Ashish

Sajid_Mahmood
Creator
Creator

I am new to qlikview and requires this option. Where the script is placed in the qlikview document and how the image is created. When the document is opened or button pressed etc. please send the sample document of qlikview file with this option working.

Thanks

Sajid

Anonymous
Not applicable

Sajid,

The vbscript in this example is running from an external file. Saved into a document called xxxxx.vbs. The vbscript launches QlikView, reloads and exports a sheet as an image before exiting.

Not applicable

Dear Johannes

When i first time run application with the help of vb script

the image is not cropping(sheet full image) now i again run this application with vb script my

image is cropping(Not full sheet image)

Please help me again

Regards

Ashish

bradshields
Partner - Creator
Partner - Creator
Author

HI Ashish,

I just tried it as suggested by Johannes. Two things can go wrong

- first under QV9 sr3 and maybe less when leasing a licence from the server the vbs won't work as QV doesn't deal with opening the qv file well. It works perfectly under under a stand alone version.

- second my qlikview seems to open in a non-maximised size and when that happens the image that is captured is the same size

Anyone got any ideas on forcing QlikView to open full screen?

I am thinking of using setting up an execute command in a qlikview document that will call the vbs. Hopefully this will automate the capture of the dashboard image

Brad

Not applicable

please help me same issue

Regards

ashish

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

A solution to getting QlikView to maximize prior to export has been posted here: http://community.qlik.com/forums/p/29239/115290.aspx#115290

Thanks all who assisted in this thread - it's saved me a lot of time.

Regards,
Steve

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

I've uploaded an example of exporting a sheet to a file using macro code as a shared QlikView:

http://community.qlik.com/docs/DOC-4315

Hope it is useful to some of you.

Steve

http://www.quickintelligence.co.uk/