Author Topic: Large data set export into excel sheet  (Read 2343 times)

megastream

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 23
    • View Profile
Large data set export into excel sheet
« on: December 24, 2020, 07:15:45 pm »
I have an issue with the large data set export into an excel sheet.  I am export 13k product into excel sheet using  blob = this.exportData({}); but it's not working properly it's working only for small data set. 

So please provide necessary solution regarding this

 blob = this.exportData({
                    url: "ajaxurl",
                    filename: JSON.stringify({
                        'filename': filename,
                        'ids': ids,
                        'groupIds': groupIds
                    }),
                    // render: true
                });
 if(typeof blob === "string"){ blob = new Blob([blob]);}
saveAs(filePath, exportedFileName);

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6282
    • View Profile
Re: Large data set export into excel sheet
« Reply #1 on: December 24, 2020, 08:19:36 pm »
Please mention what issue are you facing.

megastream

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Large data set export into excel sheet
« Reply #2 on: December 24, 2020, 08:46:06 pm »
it's not passing $_POST['pq_data'] value into API method so, it's not generating Xls file. but when I am trying with some of the selected row ex  1-100 records then it's working fine.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6282
    • View Profile
Re: Large data set export into excel sheet
« Reply #3 on: December 24, 2020, 08:52:12 pm »
In your first post your code is for local export:

Code: [Select]
saveAs(filePath, exportedFileName);

There is no need to pass $_POST['pq_data'] to the remote server in case of local export.

Example: https://paramquery.com/pro/demos/export_local

megastream

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Large data set export into excel sheet
« Reply #4 on: December 24, 2020, 09:08:11 pm »
Thank you for your reply.

I am using the $_POST['pq_data']  variable under the API method for getting the selected row HTML which is using for generating an excel-sheet.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6282
    • View Profile
Re: Large data set export into excel sheet
« Reply #5 on: December 24, 2020, 09:58:32 pm »
PHP post variable size can be increased by php.ini configuration.

Anyway if you want to do any run time manipulation in generated Excel, it's better to do it in intermediate javascript worksheet rather than in your PHP scripts.
« Last Edit: December 24, 2020, 10:19:17 pm by paramvir »