Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ashok1203
Creator II
Creator II

Export straight table data in to Qvd

Hi All,

I need a small help. I have created a report in the QV application. i want to export that report data automatically everyday into a QVD. I have written one macro for this after post reload action. I am getting the QVD but with a limited set of rows i.e. 65536. I need all the data into a QVD. can any one help me on this.

AAK
1 Solution

Accepted Solutions
ashok1203
Creator II
Creator II
Author

Hi I am not using any loop in my macro code.Please look at below macro code am using :

sub Export

set obj1 = ActiveDocument.GetSheetObject("CH36")

obj1.ExportBiff "D:\Exportv1.csv"

end sub

Please help me in this regard. Is their any alternative way to do this?

thanks in Advance...!

AAK

View solution in original post

14 Replies
ashok1203
Creator II
Creator II
Author

Guys Any Idea on this. Please share your views on this ASAP. I need a quick help on this.

AAK
Anonymous
Not applicable

65536 sounds like a limitation of a numeric variable?

do you use a loop with a counter? Counter runs from 0 to ffff (or 65536)?

if not, post ypur macro

ashok1203
Creator II
Creator II
Author

Hi I am not using any loop in my macro code.Please look at below macro code am using :

sub Export

set obj1 = ActiveDocument.GetSheetObject("CH36")

obj1.ExportBiff "D:\Exportv1.csv"

end sub

Please help me in this regard. Is their any alternative way to do this?

thanks in Advance...!

AAK
Anonymous
Not applicable

I am very sure that the Problem is the cvs file.

while Excel has no more the Limit to 65536 lines

but csv still has it..

also csv is loosing formating options

try to Export to excel

obj1.ExportBiff "D:\Exportv1.xls"

ashok1203
Creator II
Creator II
Author

I tried to export the same in .xls, .xlsx, .qvd also. But all are giving the same result.

AAK
avinashelite

Its the limitation with the Excel , we could export only the first 65536 rows of data in the export . In order to get the complete rows you need to write the macro to do that 

Try like this:

1.Count the number of rows

2.If its more than get 65536 rows than you need divide the data set in to first 65536 and second 65536 like this then loop through and export the complete same.

OR

Build the complete logic in the script and then directly create the QVD so that you won't face this issues

hope this helps you

ashok1203
Creator II
Creator II
Author

-Thanks Avinash for your help. Do you any macro code to divide the data automatically from the object and export it to N no. of files.

- In script we are getting the data not in one table. It's around 10 tables. So, I hope cann't create the logic to create a QVD in backend it self.

AAK
avinashelite

I don't have any , you could try with the digvijay‌ suggested thread , hope that might give you the idea