Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Automating the QVW file

I am looking to export current graphs and Charts made on mine qlikview document to a particular file type CSV or excel.

How can I do it

I tried some macro code from the this forum but its not working .

Its giving error while

Set oDQVInformeExcel = CreateObject("QlikTech.QlikView")

Please help me.

Another problem I am facing is that I want to show some custom msg in terms of pop ups when a user clicks them. Clicks are made on some region of the graphs..


Ideas are invited.

Thanks ,


Atul

4 Replies
Not applicable
Author

Use below code..just change the name of your QVW file(PG EIR in my example).

'Export objs to excelTest
sub ExportBitmapExcel2
dim str1
ActiveDocument.Sheets("PG EIR").ActivateAll
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
set s=ActiveDocument.Sheets("PG EIR")
objExcel.Workbooks.Add
for i=0 to s.NoOfSheetObjects-1
s.SheetObjects(i).Activate
next
for i=1 to s.NoOfSheetObjects-1
str1 = "CH0" & i //Change object type as MB0 for multibox, etc
ActiveDocument.GetSheetObject(str1).CopyBitmapToClipboard
objExcel.ActiveSheet.Paste
next
if err.number > 0 then
msgbox "Error occured "
end if
end sub

Not applicable
Author

Thanks Sunil for your reply..

can You please send a sample qvw and excel file to atul[dot]iiitm[at]gmail.com and how it works..

I tried your code. but could nt get much help ..


Thanks ,
Atul

Not applicable
Author

Go to Edit Module(Or CTRL+M)...paste the script and change the qvw name as yours....on left part of edit module screen, select 'allow system access' on 2 drop downs and click 'test' to run the report. My code will copy all the chart objects(i.e. CH01,02..etc) on excel. Try to make sure that object names are in sequential order;i.e. CH01, CH02..etc.

Sorry I can't share qvw file as application is confidential.

Not applicable
Author

Hi Sunil I tried your code but its stopping at ActiveDocument.Sheets("myfile").ActivateAll


I am just asking to send a sample file with dummy chart .

Thanks ,

Atul