Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export to Excel or CSV a huge table more than 160000 lines

Hello,

I need to export more than 160,000 lines in a csv file.

obj.Export "c:\Test.CSV" , "," , , TRUE (not work )

 

obj.ExportEx "c:\Test.XLS"  (not work)

and i have error failed to write data to the file  (after 30 mn of execution ).

Is there a function that distributes the rows retrieved on sheets of 65536 lines as does the XLS button?

Someone of you has an idea to export a table of this size to Excel or CSV File.

Thanks for your Help

6 Replies
jfkinspari
Partner
Partner

If you don't need do be able to set filters and make selections before the export, you could let the script do the job by using the Store function.

Regards,

Not applicable
Author

Hi Jens Frederik,

Thanks for your help,but I need a command that I can use in a macro.

I have a filter implemented for this table.

Do you have an other suggestions?

jfkinspari
Partner
Partner

Perhaps you instead could look into the requirements of the user, and try solving the problem by altering the task.

Is it really necessary to export that amount of rows? 

Can the data be aggregated, making the number of rows smaller?

Which operations are performed in Excel, and can they be migrated to QV?

Not applicable
Author

It's for this reason that we have implemented filter to reduce the volumetry and generate an Excel File for each case

I can export the result in a .txt file but it doesn't fit the need of the user.

jfkinspari
Partner
Partner

The macro I have used before to export tables is this:

set obj = ActiveDocument.GetSheetObject("CH29")

obj.ExportBiff "\\Foldername\Filename.xls"

It looks a bit different from yours, but wheter is has a performance diffence is unclear. You could give it a go, and let everyone know

Not applicable
Author

With this statement we can have an Excel file with several Sheet.

This is valid for a certain volume of lignes. In my case (high volume) the generated file can not be read error (invalid format).This is the best solution I've tried.

You should know with such volumetry one csv file that exceeds 250MB and more than 160,000 lines notepad can not read.