Accessing Large Amounts of Data with Data Tables & Using Data Tables with Excel

Accessing Large Amounts of Data with Data Tables & Using Data Tables with Excel

richardcrichardc Posts: 1Questions: 0Answers: 0
edited February 2011 in General
I would first like to thank the people involved in creating Data Tables, its a wonderful tool that I am finding many uses for.

My 2 questions are:

1. Is there a way for Data Tables to work smoothly when accessing a table that has over 5,000 entries? I have a large list of over 5000 acronyms and I want to put them into datatables so that users can search through them with ease. Now at this moment in time I cant do anything server side because I dont have access (I know this would be simple solution), would using a Javascript array or Ajax source work? The main problem I am having is load times being that there's over 5,000 entries.

2.Is it possible to populate DataTables from an excel spreadsheet? An example would be I have a list of users that is updated on a regular basis that users could search through on a webpage. Is there a way to have the excel file linked to data tables so that data tables automatically extracts the information from that spreadsheet and displays it within data tables?

Many Thanks,

Rich

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    1. Chrome, Firefox, Safari etc won't have a problem with 5000 entries - IE8 and before likely will, simply because the Javascript engine is so slow. You can do a few things like turning of bSortClasses, or sorting entirely (.... :-( ) but really it comes down to the fact that it's got a chunk of data to process, which takes a finite time. Javascript array, Ajax source or DOM sourced data, it won't make much difference to the processing speed I don't think. The one thing to do for certain is to make sure that your server is using gzip compression to send the data though - that will save a good chunk of loading time.

    2. Not really - you would need to get the data into either HTML or a suitable Javascript array format. DataTables doesn't have the ability to read XLS files directly - a translation would be needed.

    Allan
  • MrBaseball34MrBaseball34 Posts: 96Questions: 0Answers: 0
    @richardc,
    For using excel spreadsheets as your data, take a look at PHPExcel. IT is a rather fins class that you can use to open your PHP files and then output them directly to HTML tables.
    http://phpexcel.codeplex.com
This discussion has been closed.