Questions tagged [jquery-csv]

jQuery-csv is a jQuery plugin for parsing CSV data into JS arrays or objects, or for converting JS objects and arrays to CSV files.

59 questions
5
votes
2 answers

JS FileReader: Read CSV from Local File & jquery-csv

I have a CSV file in the same directory as an html page, and I'd like to use FileReader to read the file contents into a jquery-csv's To Arrays function, but I can't seem to get it to work properly. I think I understand the asynchrony of this task,…
Terrarium
  • 74
  • 1
  • 1
  • 4
3
votes
2 answers

Get CSV into array using jquery-csv

I am trying to get data from the following CSV which is in my local folder as bids.csv: 1, 3000 4, 2500 15, 2000 into an array. I'm using the jquery-csv library but without success. Here is my entire code:
mcplums
  • 159
  • 2
  • 2
  • 9
3
votes
1 answer

Create dataTable column definition from uploaded csv data

M trying to create datatable out of uploaded csv file. the only problem i'm facing is defining table column header. Currently i have done it like this, defining header manually. var table = $('#example').DataTable({ columns: [{ …
monda
  • 3,809
  • 15
  • 60
  • 84
3
votes
2 answers

Read .csv file to object/array in javascript

I'm trying to do something that I think is fairly simple, but doesn't seem to be working. I have a .csv file in the same directory as my script file. I want to create an object or an array using the data from the .csv file. How do I access the local…
user3175088
3
votes
2 answers

Sum values in jQuery object by key

I have a csv file converted to a jQuery object using jQuery CSV (https://github.com/evanplaice/jquery-csv/). Here is the code for that: $.ajax({ type: "GET", url: "/path/myfile.csv", dataType: "text", success:…
joshuaiz
  • 415
  • 4
  • 13
3
votes
1 answer

How can I loop a csv file with countries and data in a Google Geochart?

I have a large csv file that contains a country and a corresponding piece of data for that country. In the form (excel example): [Country1, Data1], [Country2, Data2] etc How would use a loop with the csv file to produce each item in the Geocharts…
user3663720
  • 305
  • 2
  • 12
3
votes
4 answers

Parsing CSV file without standard delimiter

I'm new to JavaScript and jQuery. I'm trying to parse CSV file where delimiter is not standard sign of comma (,), but something else(;). I'm using the jQuery function $.csv.toArrays(csv, options, callback). I'm aware that delimiter is supposed to be…
Antea
  • 177
  • 1
  • 4
  • 10
2
votes
1 answer

Google Chart from multiple csv

I'm pretty new to javascript and I need your help. I'm currently working on a science project about monitoring fumaroles temperatures (Alban Hills, Italy). So I get data every 15 mins and I created a .csv file named like fumarola1-YY-m-d.csv (e.g.…
2
votes
1 answer

jquery-csv missing out last item of csv-file when using toArrays()

I am trying to import a csv-list of email addresses to a form field with jQuery-csv... Everything works fine but for some strange reason, the array is always missing out the last item (in this case it is: 'adress-6@test.com'). My jQuery: function…
David
  • 69
  • 8
2
votes
1 answer

How may I explicitly define the datatype of a Google Charts DataTable column after it has been created?

I am using jquery-csv toArrays function to populate a google visualization DataTable like this: function drawChart() { // Load the CSV file into a string $.get("Book1.csv", function(csvString) { // transform the CSV string into a…
tohox
  • 105
  • 5
2
votes
1 answer

Google Line chart from CSV

I am quite new to java-script and html stuff.. I am trying to make a basic line chart with Google chart using example.csv file but something is wrong. I dont see any chart. Nothing is being displayed. Please help. I came up with code after reading…
user2774120
  • 139
  • 3
  • 16
2
votes
2 answers

Create Google Chart from CSV input

I am trying to create a Google Chart from CSV input. Here is my current code (found in a tutorial), unfortunately isn't working -the result is an empty chart: Google Chart Example
Adrian
  • 2,576
  • 9
  • 49
  • 97
2
votes
1 answer

reading CSV error: Illegal Data. What's happening?

I'm having the following error, and I have no idea what's going on... Here is the first row in my csv file (I opened it using vim) longitude,latitude,ph,ammonium_nitrate,phosphate,permanganate,heavy_metal,email_address^M Here is the error I see in…
snowbaby
  • 23
  • 1
  • 4
2
votes
1 answer

How do I read csv file in an array in Javascript?

This is my first time with javascript and I am stuck on a problem. I have to read from csv file which contains names of top 1 million websites based on Alexa traffic. The size of csv file is 22.5 MB. Based on some tutorials on net, I am trying to do…
rishiag
  • 2,248
  • 9
  • 32
  • 57
2
votes
2 answers

How to populate Ng-Grid from CSV file?

I want to create client-side javascript that reads a csv file on the web server and uses that data to populate a grid created with Ng-Grid. I'm attempting to use jQuery-CSV to transform the CSV into something the grid can use. I'm new to using these…
Tim
  • 21
  • 2
1
2 3 4