Loading a CSV file into Datatables

Loading a CSV file into Datatables

arvinsimarvinsim Posts: 20Questions: 1Answers: 0
edited September 2011 in General
Does Datatables support this functionality natively?

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    No. But you will find many javascript or php (or other) packages that will parse csv, maybe turn them into or json arrays for you
  • GregPGregP Posts: 500Questions: 10Answers: 0
    Agreed. Although there should be libraries on both client and server sides, I would recommend trying to stick to the server side. Whether you get a whole table back or whether you're using an AJAX source, it's more efficient overall to do it on the server. I suspect there will also be more options in terms of libraries and native functions on the server.
  • jonkjonk Posts: 8Questions: 0Answers: 0
    You could load the CSV into a MySql table and return results using the server-side instructions. It can be done, but you will need to have the CSV loaded into the DB before Datatables can parse anything.
This discussion has been closed.