www.webdeveloper.com
Results 1 to 3 of 3

Thread: csv reading

  1. #1
    Join Date
    Oct 2012
    Posts
    7

    csv reading

    Hello Colleagues

    I have a csv file in the same folder/directory as my html page. Is there a simple way using javascript the csv file can be converted to a javascript array ? I found a work around for this by converting the csv file to a javascript file however this is a bit clunky.

    Rory Barrett

  2. #2
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,270
    See the source of this demo

  3. #3
    Join Date
    Oct 2012
    Posts
    7
    HelloJulien

    I had a look at the source but on my computer it just appeared as a series of steps. There was no demo. Nothing happened. There was a link which led to a page with some functions. One of them looks promising.
    // Quick usage with AJAX:
    jQuery.get(csvfile, function(data) { array = jQuery.csv()(data); });

    Where can I download this ?

    How exactly would it be used to put a file 'myCSV.csv' into a javascript array 'myArray'.

    Sorry to ask such basic questions.

    Rory Barrett

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles