Export CSV with too much data

Export CSV with too much data

caro.simcaro.sim Posts: 7Questions: 2Answers: 1

Hello,

I use Datatables to display 18000 rows and when I export in CSV, I have an error "The script don't answer".

I think that I have too much data to display because with 2000 rows, it work.

Someone have a solution? Maybe to hide my export button when there are too much data but I don't know how do that.

Thank you for advance

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    Can you link to the page so I can profile it? It might be that you need to use a server-side process to create the file and then download it.

    Allan

  • caro.simcaro.sim Posts: 7Questions: 2Answers: 1

    Sorry, I was in vacation. My pages isn't on the private network (intranet).

    If I use server-side process, I have only my displayed rows, how can I create a file?

    Thank you

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    how can I create a file?

    Your server-side script would basically just output the CSV file (instead of JSON, HTML or anything else).

    Allan

  • caro.simcaro.sim Posts: 7Questions: 2Answers: 1

    Thank you but how just output the complete CSV file? I don't find the code with datatables. It is possible with datatables or do I export a csv with another code?

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    I don't find the code with datatables

    You won't. Server-side creation of a CSV file is outside the scope of DataTables. You need to use some other code to do it.

    Allan

  • caro.simcaro.sim Posts: 7Questions: 2Answers: 1

    Ok thank you Allan for your help

This discussion has been closed.