Making Large XLS Files with server-side processing

Making Large XLS Files with server-side processing

pkboucherpkboucher Posts: 9Questions: 0Answers: 0
edited October 2010 in TableTools
I'm using server side with JSP, but I'm a total noob at JS.
I've got a button that changes a variable shouldIMakeXLS from 'No' to 'Yes', and I pass the variable to my server-side with this:
[code]aoData.push( { "name": "makeXLS", "value": shouldIMakeXLS } );[/code]

Then, inside of the server-side, if makeXLS is 'Yes', I skip this pagination line in my SQL query:
[code]sql += " limit " + paginationStartPoint + ", " + paginationAmount;[/code]

Then, I loop through my result set and use paginationStartPoint and paginationAmount to decide which rows to return to the client using [code]ja.put(cellContents)[/code], so the browser sees the right page of output, and I use JExcelApi on ALL the rows, and send the XLS file back to the browser as an attachement (so the user is prompted to save or open it).

My question is probably very easy for people familiar with JS, how to I generate an event when the button is clicked that will cause the server-side handler to get invoked (like it is when I filter or sort the results in the table)?

Replies

  • pkboucherpkboucher Posts: 9Questions: 0Answers: 0
    I would like to modify TableTolls so that when they click on the XLS button, it sets the variable to 'Yes' and calls the server-side, but I don't know how to make it call the server-side at that point.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Ping me using the form at http://datatables.net/contact and I'll send you over a development copy of TableTools 2 which provides exactly this kind of export to Ajax ability (allowing the server-side to make the XLS).

    Allan
This discussion has been closed.