Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

Not creating qvd file

Hi,

In my qvw file i written  OnOpen action to reload my file with macro code. Now it's reloading the file. And  I also written on OnPostReload to create qvd file for table box.

- But it is not working for me. i.e it is not generating qvd file for me.

Can anyone help me

8 Replies
rahulgupta
Partner - Creator III
Partner - Creator III

Hi,

Can you please attach any sample file.

Regards

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Hi Rahul,

I'm attaching sample qvw file for your reference.

rahulgupta
Partner - Creator III
Partner - Creator III

Hey Hi,

You can use this way.

Regards

daveamz
Partner - Creator III
Partner - Creator III

Hi Mr. Nokia,

Try to export the file to other driver than C:\

I got the "Cannot open file C:\Test.qvd for writing!" message. After I've set target to D:\ (obj.Export "D:\Test.qvd",",") it worked.

Regards!

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   The code you have written is working at my side.

   Can you please tell us what is the error that you are getting.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
ToniKautto
Employee
Employee

ActiveDocument.Export creates a SKV file, which is a semicolon separated textfile.

According to QlikView API Guide the QVD can be generated by using ExportEx with Export Format set to 4 as example below shows.

set obj = ActiveDocument.GetSheetObject("CH01")

obj.ExportEx "C:\test.qvd", 4    

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

I think you are reloading manually. Don't do that create a macro code to reload and apply OnOpen trigger. Now just close the qvw file and open now it should create qvd file. But it is not creating qvd file.

- I tried like this i had created a batch file to reload this qvw file. Then it is creating qvd file when batch file is running.

ToniKautto
Employee
Employee

Ah, did not realize that you have a Table box in the example. You need to select the export function carefully, depending on how you plan to execute it. And then of course there need to be write access to the folder where file is written.

Export Straight table chart to QVD;

set obj = ActiveDocument.GetSheetObject("CH01")

obj.ExportEx "C:\test.qvd", 4   

Export Table Box object on ServerSide to QVD;

set obj = ActiveDocument.GetSheetObject("TB01")

obj.ServerSideExportEx "C:\test.qvd", 4