sofathitesh / jquery-csv Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/jquery-csv
License: MIT License
Automatically exported from code.google.com/p/jquery-csv
License: MIT License
Try to run your the tests (http://jquery-csv.googlecode.com/git/test/test.html)
in IE9. The defect was discovered in other browsers as well, but running the
tests in IE9 shows the worst possible outcome.
The problem is an extra ',' at line 659 (rev.:5eacc4afc1d5) of jquery.csv.js:
state: {
rowNum: 1,
colNum: 1, //here is the problem
}
Link to source:
http://code.google.com/p/jquery-csv/source/browse/src/jquery.csv.js?spec=svn5eac
c4afc1d55714e45e2ceb891f930e0092c6f5&r=5eacc4afc1d55714e45e2ceb891f930e0092c6f5#
659
Original issue reported on code.google.com by [email protected]
on 19 Nov 2012 at 4:54
What steps will reproduce the problem?
1.use above fiddle
2.import this csv file
"TimeStamp (ms)","MID 128|PID 91|Accelerator pedal position (%)","MID 128|PID
92|Engine load(%)","MID 128|PID 100|Engine oil pressure (bar)","MID 128|PID
105|Intake manifold temperature (N0C)","MID 128|PID 110|Engine coolant
temperature (N0C)","MID 128|PID 190|Engine speed (r/min)"
115,10.4,0,0,0,0,0
175,,40,,,,
309,,,4.55,,,
529,,,,17,,
630,,,,,46,
682,,,,,,1011.25
751,10.4,,,,,
803,,40,,,,
856,,,4.55,,,
921,,,,17,,
1013,,,,,46,
1521,,,,,,1016.5
1593,10.4,,,,,
1641,,39,,,,
1704,,,4.58,,,
1761,,,,17,,
1832,,,,,46,
1897,,,,,,1023
1961,10.4,,,,,
2025,,37,,,,
2088,,,4.58,,,
2145,,,,17,,
2217,,,,,46,
2283,,,,,,1022.25
2344,10.4,,,,,
2408,,36,,,,
2464,,,4.58,,,
2576,,,,17,,
2633,,,,,46,
2698,,,,,,1001
2767,10.4,,,,,
error thrown from google 'Uncaught Error: Type mismatch. Value does not match
type number in column index 6'
Works with another csv file of similar construction.
Any ideas?
Thanks for this great script.
Original issue reported on code.google.com by [email protected]
on 24 Oct 2012 at 7:31
What steps will reproduce the problem?
1. $.csv.toObjects(dataToBeParsed)
What is the expected output? What do you see instead?
expected: [{one: 1, two: 2}, {the: 34, fjd: 4343}]
what i get: [{one: 1, two: 2, function(){}, function(){}, function()......,
function(){}.......}, {the: 34, fjd: 4343, function(){}, function(){},
function()......, function(){}.......}]
What version of the product are you using? On what operating system?
7.1
Please provide any additional information below.
Fix: Line number 750 -> Dont user 'for (var j in header)' --> Use 'for(var j=0;
j <headers.length; j++) '
Original issue reported on code.google.com by [email protected]
on 17 Apr 2014 at 4:22
What steps will reproduce the problem?
1.Have a csv file for google motion chart
2. Read the csv file for google data table
What is the expected output? What do you see instead?
1. Draw google motion chart
2. Second column is not in time format
What version of the product are you using? On what operating system?
Windows
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 16 Jul 2015 at 5:52
Attachments:
Returns:
Uncaught TypeError: Cannot read property 'separator' of undefined
jquery.csv-0.71.min.js:27
$.csv.parsers.splitLines jquery.csv-0.71.min.js:27
When I add the optional configuration {separator: "," , delimiter: "\x22" } the
console returns:
Uncaught TypeError: Cannot read property 'rowNum' of undefined
jquery.csv-0.71.min.js:27
$.csv.parsers.splitLines jquery.csv-0.71.min.js:27
Original issue reported on code.google.com by [email protected]
on 7 Apr 2013 at 6:09
What steps will reproduce the problem?
Loading CSV file via the following
var csvData = $.ajax({
type: "GET",
url: "my.csv",
dataType: "text",
error: function ( xhr, errorType, exception ) {
var errorMessage = exception || xhr.statusText;
alert( "There was an error loading your data file: " + errorMessage );
},
success: function (result) {
alert(result); <= shows that CSV data loadad
//alert($.type(csvData)); <= returns 'object'
//alert("done!"+ csvData.getAllResponseHeaders())
myCSVArray = $.csv.toArray(csvData); <= breaks.
//alert( $.toJSON(myCSVArray) );
}
});
What is the expected output? What do you see instead?
IE Debugger captures the following error
SCRIPT438: Object doesn't support property or method 'replace'
jquery.csv-0.64.js, line 220 character 7
Original issue reported on code.google.com by [email protected]
on 10 Oct 2012 at 8:14
It would be very convenient to trim leading and trailing whitespace from each
value as it is parsed.
Original issue reported on code.google.com by [email protected]
on 20 Jan 2013 at 4:23
What steps will reproduce the problem?
1. Trying to have a csv file processed of 79 Mb
2.
3.
What is the expected output? What do you see instead?
display of the table is expected, but chrome crashes instead
What version of the product are you using? On what operating system?
Chrome Version 23.0.1271.64 m // Windows 7 Home Premium 64 bit SP1
Please provide any additional information below.
tried to upgrade the priority of the process related to the web page to
Realtime / high this didn't solve the issue.
the csv file is too big to be attached, but I uploaded it on Google Drive and
shared it with [email protected]
https://docs.google.com/open?id=0B1nPY5NSSvp1OF81TkdiLW11WWc
Original issue reported on code.google.com by [email protected]
on 25 Nov 2012 at 11:19
Parsing huge csv file triggers the browser's alert mechanism to stop the
script.
I am trying to see where I can make changes so I can parse few thousand rows
and then use settimeout and resume the remaining data parsing. Has anyone done
this, any pointers how it can be done?
Thanks
Original issue reported on code.google.com by [email protected]
on 14 Nov 2013 at 7:47
What steps will reproduce the problem?
1. CSV file exported on a mac from excel
2. read data into buffer and hand it off to parser
3. parser throws exception
What is the expected output? What do you see instead?
Should be able to parse the file. see additional info below.
What version of the product are you using? On what operating system?
.71
Please provide any additional information below.
Was able to get the parser to work by making it not "ignor" ^/r$ sequences which I believe is a match for string that is simply "/r/n" which I believe is the expected end of line sequence. If these are treated the same as a simple /n by the parser then the parser works fine. However I don't know if these mods effect the way the parser works on files not exported from excel or not on a mac
Original issue reported on code.google.com by [email protected]
on 10 Sep 2013 at 6:58
What steps will reproduce the problem?
1.Pass a two arg call to $.csv.toObjects(csvData, callback)
2.
3.
What is the expected output? What do you see instead?
Callback is is not invoked. If an empty object is passed as second arg:
$.csv.toObjects(csvData, {}, callback)
then the callback is invoked.
What version of the product are you using? On what operating system?
0.71
Please provide any additional information below.
Maybe its just my understanding of optional args .... if both "optional" args
need to be present, maybe the docs need amending?
Original issue reported on code.google.com by [email protected]
on 15 Feb 2015 at 4:39
What steps will reproduce the problem?
1. We've used jquery-csv with no issues until we recently upgraded from Zurb
Foundation 2 to Zurb Foundation 3. Now we get a jquery error.
Here's a Foundation2 page which does work:
http://www.nwcouncil.org/reports/financial-reports/2014-99/legal/
And a Foundation3 page which causes an error:
http://www.nwcouncil.org/reports/financial-reports/2014-99/admin
Chart is supposed to appear under "Staffing" heading, but developer console
shows "Uncaught TypeError: Cannot read property 'toArrays' of undefined " at
the line:
$.get(path+"rngHistoryByFunction.csv", function (csvString) {
arrayData = $.csv.toArrays(csvString, { onParseValue: $.csv.hooks.castToScalar });
The Zurb Foundation seems the culprit because changing our two Zurb .js calls
(foundation.js, app.js) from Foundation3 back to 2 fixes the problem.
Original issue reported on code.google.com by [email protected]
on 15 Apr 2014 at 6:45
What steps will reproduce the problem?
1. Parse a CSV file with an onParseValue callback function.
2. When the callback is executed for the second and subsequent data row, the
column number is incorrect. It keeps incrementing instead of being reset to 1
on data rows after the first.
Please see attached test case.
What is the expected output? What do you see instead?
I expect to see the column number reset to 1 on each row parsed. For the
specific example, I would expect to see the following output.
[row=1, col=1] col1
[row=1, col=2] col2
[row=2, col=1] 101
[row=2, col=2] 102
[row=3, col=1] 103
[row=3, col=2] 104
The actual output contains incrementing column numbers for the second and
subsequent data rows. The column numbers are not reset to 1. I get the
following output for the test case.
[row=1, col=1] col1
[row=1, col=2] col2
[row=2, col=1] 101
[row=2, col=2] 102
[row=3, col=3] 103
[row=3, col=4] 104
What version of the product are you using? On what operating system?
Tested on jquery-csv v0.71 and Chrome 32.0.1700.76.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 21 Jan 2014 at 7:03
Attachments:
Found in most recent versions of Chrome and Firefox.
To reproduce: $.csvEntry2Array("1,2,,4"), which results in ["1", "2", "4"],
when ideally we want ["1", "2", "", "4"].
I wrote a patch that works well for me. Here's the patch, but maybe the
developer would like to reinclude this as an option, there might be someone who
wants empty cells discarded.
--- a/inc/jquery.csv-0.61.js
+++ b/inc/jquery.csv-0.61.js
@@ -92,6 +92,8 @@ RegExp.escape= function(s) {
output.push(m1.replace(reDelimiterUnescape, delimiter));
} else if(typeof m2 === 'string' && m2.length) { // Fix: eval
output.push(m2);
+ } else if(typeof m0 === 'string' && typeof m1 === 'undefined'
+ output.push("");
}
return '';
});
Original issue reported on code.google.com by [email protected]
on 4 Sep 2012 at 11:40
What steps will reproduce the problem?
1. Import a file with only one column and no new line character for last entry.
What is the expected output? What do you see instead?
Check for the last entry. It should be the last name in the file. It is
currently showing second last name. The last name is not shown.
What version of the product are you using? On what operating system?
jquery.csv-0.7.1.js
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 22 Jan 2013 at 7:45
Attachments:
What steps will reproduce the problem?
1. Create an empty .csv file
2. Pass it to $.csv.toObjects() function
3. Observe the error in the console
What is the expected output? What do you see instead?
It is expected to return an empty object.
It shows an error in the console:
Uncaught TypeError: Cannot call method 'replace' of undefined
jquery.csv.js:501
What version of the product are you using? On what operating system?
Latest version 0.71 on Mac OSX
Please provide any additional information below.
You can even reproduce it at your Basic Usage demo:
http://jquery-csv.googlecode.com/git/examples/basic-usage.html
1. Click on toObjects() tab
2. Delete the input data (leave it empty)
3. Run!
4. Observe the console
Original issue reported on code.google.com by [email protected]
on 5 Jun 2013 at 2:38
What steps will reproduce the problem?
in IE9, Firefox, opera etc the data
"Del", "Trotter",, "0123 456 789"
correctly returns:
[1]="Dell"
[2]="Trotter"
[3]=""
[4]="0123 456 789"
but in IE8 it returns
[1]="Dell"
[2]="Trotter"
[3]="0123 456 789"
Original issue reported on code.google.com by [email protected]
on 2 Oct 2012 at 9:56
What steps will reproduce the problem?
1.Try upload the file attached here
http://jquery-csv.googlecode.com/git/examples/file-handling.html
2.Showing the error CSVDataError: Illegal State [Row:1][Col:1] in console
Original issue reported on code.google.com by [email protected]
on 3 Jul 2013 at 6:35
What steps will reproduce the problem?
1. Run an angular project using jquery-csv
2. Run Test
3. Test fails with following message "TypeError: Cannot call method 'replace'
of undefined" :
Whole trace :
What is the expected output? What do you see instead?
Expected output is that test should pass.
What I have instead :
Starting Karma Server (http://karma-runner.github.io)
-------------------------------------------------------------------
INFO [karma]: Karma v0.10.6 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 31.0.1650 (Mac OS X 10.7.5)]: Connected on socket
ao7xN3nbm-oTCCNMTnpx
Chrome 31.0.1650 (Mac OS X 10.7.5) Controller: IndexCtrl should have at least
one entry in vmcollection FAILED
TypeError: Cannot call method 'replace' of undefined
at Object.$.csv.parsers.parseEntry (/Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/vendor/jquery-csv/jquery.csv-0.71.js:501:13)
at Object.$.csv.toArray (/Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/vendor/jquery-csv/jquery.csv-0.71.js:618:33)
at Object.$.csv.toObjects (/Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/vendor/jquery-csv/jquery.csv-0.71.js:733:27)
at $http.transformResponse (/Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/js/controllers.js:13:26)
at transformData (/Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/lib/angular/angular.js:6819:12)
at transformResponse (/Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/lib/angular/angular.js:7491:17)
at wrappedCallback (/Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/lib/angular/angular.js:10689:81)
at /Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/lib/angular/angular.js:10775:26
at Scope.$eval (/Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/lib/angular/angular.js:11668:28)
at Scope.$digest (/Users/nsteinmetz/Documents/Projets/angular/vmagindex/app/lib/angular/angular.js:11513:31)
Chrome 31.0.1650 (Mac OS X 10.7.5): Executed 4 of 4 (1 FAILED) (0.74 secs /
0.145 secs)
Test is about checking that length of my object once the csv has been parsed.
What version of the product are you using? On what operating system?
0.71 version.
AngularJS 1.21
Please provide any additional information below.
Let me know if you need more code samples. I should publish it soon.
Original issue reported on code.google.com by [email protected]
on 30 Nov 2013 at 11:26
Its more like feature request, it would be even cooler if you make it parse
datetime field to use with Google charts.
Original issue reported on code.google.com by [email protected]
on 27 Feb 2013 at 12:07
What steps will reproduce the problem?
1. The following data isn't parsed properly
What is the expected output? What do you see instead?
The following example data set
{{{
csv = 'foo, bar, "baz", "say, ""hello"""'
$.csv2Array(csv)
}}}
returns
{{{
[ 'foo', 'bar', 'baz, null ]
}}}
Original issue reported on code.google.com by [email protected]
on 6 Jun 2012 at 3:03
What steps will reproduce the problem?
$.csv.toArrays("Testing,Two\n"); /* Works */
$.csv.toArrays("Testing\",Two\n"); /* Throws an "Illegal Quote" error */
$.csv.toArrays("Testing\\\",Two\n"); /* Also throws an "Illegal Quote error" */
What is the expected output? What do you see instead?
It should parse the quotes. Right now looks like the only quotes that can be
in the strings are if they are enclosing the field.
What version of the product are you using? On what operating system?
0.71
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 25 Apr 2014 at 5:40
What steps will reproduce the problem?
1. Visit http://jquery-csv.googlecode.com/git/examples/basic-usage.html
What is the expected output? What do you see instead?
The line says "Used to convert multi-line CSV data into an array onjects
containing the data as key-value (ie header:value) pairs."
It should say "objects" instead of "onject"
What version of the product are you using? On what operating system?
N/A
Please provide any additional information below.
N/A
Original issue reported on code.google.com by ranhiru
on 2 Oct 2013 at 5:13
What steps will reproduce the problem?
1.Make a CSV file
2. Save it using Mac formatted ends of lines.
3. Load it up.
What is the expected output? What do you see instead?
I expect it to work. Everything works great when using windows or linux
formatted CSV files. When using Mac files, I get CSVDataError: Illegal state
[Row:1].
What version of the product are you using? On what operating system?
This library has always acted this way. I hadn't gotten around to filing this
particular bug report yet. But I would like it fixed if possible, so that I
don't have to make my users worry about end of line formatting. So even in
0.71, this happens.
Please provide any additional information below.
Maybe the weird mac formatting is not in the official spec for CSV, but it
would be nice if we could use it anyways. Why create the extra work for my
end-users?
This test.csv will fail to load. This test2.csv is identical, except for it
uses windows end of line formats. A good text editor doesn't show the
difference. The actual difference is that Mac format doesn't use line feed
characters, and this causes jquery-csv to fail. This also messes up
Notepad.exe.
Original issue reported on code.google.com by [email protected]
on 30 May 2013 at 1:06
Attachments:
What steps will reproduce the problem?
1.create a csv file with 4 columns
2.first column with string values
3.2-4 columns with numbers
What is the expected output? What do you see instead?
i expect to see a graph but i see a blank box instead
What version of the product are you using? On what operating system?
version 0.7 beta on windows 7 os
Please provide any additional information below.
nil
Original issue reported on code.google.com by [email protected]
on 8 Feb 2015 at 5:23
Attachments:
What steps will reproduce the problem?
I have implemented a script using this plugin to parse a CSV file and
manipulate the data using jQuery. This works perfectly fine in FireFox and
Chrome but is failing in IE with the error of "CSVDataError: Illegal State"
just below the "// broken paser?" line in the jquery.csv.js file.
What is the expected output? What do you see instead?
The expected output is the working page that I see in FireFox and Chrome
without any problems. In IE, this causes the entire file to fail to load. If
I comment out the "throw new Error()" lines, it won't throw an error anymore
but still fails to load properly.
Please provide any additional information below.
I can't share the code/CSV file for confidentiality reasons as this is an
internal resource at my company. However, this does work perfectly fine
without any errors in FireFox and Chrome on both Windows and Mac. It seems to
be solely isolated in IE and the version of IE used doesn't seem to make any
difference.
Original issue reported on code.google.com by [email protected]
on 4 Apr 2014 at 4:32
What steps will reproduce the problem?
1. Execute the tests given in
http://jquery-csv.googlecode.com/git/test/test.html
What is the expected output? What do you see instead?
All tests should pass.
What version of the product are you using? On what operating system?
Found on Chrome: 32.0.1700.76 m, windows 7
Please provide any additional information below.
Log:
core: Parsing - from Arrays (1, 0, 1)Rerun
$.csv.fromArrays()
Expected:
"\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\""
Result:
"All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
"
Diff:
"\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"
\"All work\",\"and no play\",\"makes Jack\",\"a dull boy...\"" "All work,and no
play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
All work,and no play,makes Jack,a dull boy...
"
Source:
at Object.<anonymous> (http://jquery-csv.googlecode.com/git/test/test.html:224:5)
Second failure error:
core: Parsing - from Objects (1, 0, 1)Rerun
$.csv.fromObjects()
Expected:
"\"ID\",\"iManufacturer\",\"iMPartNumber\",\"iSerialNumber\",\"iSimCategory\",\"
iPartType\",\"iDescription\",\"iGroup\",\"iLocation\",\"iSold\"
\"1\",\"Evans &
Sutherland\",\"230-132-111AA\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"2\",\"Evans &
Sutherland\",\"230-132-111AA\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"3\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"4\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"5\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"6\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"7\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"8\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"9\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"10\",\"Evans &
Sutherland\",\"230-121-150AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\""
Result:
"ID,iManufacturer,iMPartNumber,iSerialNumber,iSimCategory,iPartType,iDescription
,iGroup,iLocation,iSold
1,Evans & Sutherland,230-132-111AA,,Visual,PCB,,1,Offsite,
2,Evans & Sutherland,230-132-111AA,,Visual,PCB,,1,Offsite,
3,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
4,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
5,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
6,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
7,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
8,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
9,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
10,Evans & Sutherland,230-121-150AC,,Visual,PCB,,1,Offsite,
"
Diff:
"\"ID\",\"iManufacturer\",\"iMPartNumber\",\"iSerialNumber\",\"iSimCategory\",\"
iPartType\",\"iDescription\",\"iGroup\",\"iLocation\",\"iSold\"
\"1\",\"Evans &
Sutherland\",\"230-132-111AA\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"2\",\"Evans &
Sutherland\",\"230-132-111AA\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"3\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"4\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"5\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"6\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"7\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"8\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"9\",\"Evans &
Sutherland\",\"230-120-112AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\"
\"10\",\"Evans &
Sutherland\",\"230-121-150AC\",\"\",\"Visual\",\"PCB\",\"\",\"1\",\"Offsite\",\"
\""
"ID,iManufacturer,iMPartNumber,iSerialNumber,iSimCategory,iPartType,iDescription
,iGroup,iLocation,iSold
1,Evans & Sutherland,230-132-111AA,,Visual,PCB,,1,Offsite,
2,Evans & Sutherland,230-132-111AA,,Visual,PCB,,1,Offsite,
3,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
4,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
5,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
6,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
7,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
8,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
9,Evans & Sutherland,230-120-112AC,,Visual,PCB,,1,Offsite,
10,Evans & Sutherland,230-121-150AC,,Visual,PCB,,1,Offsite,
"
Source:
at Object.<anonymous> (http://jquery-csv.googlecode.com/git/test/test.html:240:5)
Original issue reported on code.google.com by [email protected]
on 17 Jan 2014 at 7:11
What steps will reproduce the problem?
1. Pass a CSV file with one or more blank lines into $.csv.toObjects(file)
What is the expected output? What do you see instead?
I expect it to just ignore the blank lines, or do something with them. At least
a blank line at the end. I would expect that an extra blank line at the end of
CSV files is a common occurrence.
Specifically, it errors here, at line 365.
for(var j in headers) {
object[headers[j]] = entry[j];
}
Uncaught TypeError: Cannot read property '0' of undefined
This is because in the case a blank line, entry is undefined.
What version of the product are you using? On what operating system?
0.64 on Windows.
Please provide any additional information below.
It's up to you to decide what your program should do in this case. I figured it
out and I can remove the blank lines from my input, but if one of my users puts
a blank line in their input, it will just silently fail. I would prefer that to
not happen. I guess alternatively, I could check the input before putting it
through your function and removing the blank line myself.
Original issue reported on code.google.com by [email protected]
on 10 Oct 2012 at 8:42
What steps will reproduce the problem?
1. npm install jQuery
2. in node
- var $ = require('jQuery');
- var jcsv = require('./jquery.csv.js');
I was getting
ReferenceError: jQuery is not defined
Whenever I tried this. Some instructions on using this plugin with node would
be useful. I figured out that I need to do:
//fake browser window
global.window = require("jsdom").jsdom().createWindow();
global.jQuery = require("jquery");
jcsv = require('jquery.csv.js');
jQuery.csv2Dictionary(stuff); // note that the methods get attached to jQuery,
not jcsv
Original issue reported on code.google.com by [email protected]
on 27 Sep 2012 at 2:37
What steps will reproduce the problem?
1. $.get('pres_data.csv'), function(data) { // file: http://d.pr/f/nQI7
2.var presData = $.csv2Array(data);
What is the expected output? What do you see instead?
an array with alot of numbers
What version of the product are you using? On what operating system?
0.6
Please provide any additional information below.
works in Chorme and Safari but i Firefox the array is all emtpy :(
console.log(data) seem fine i FF but console.log(presData) is all empty. agin
only in FF
Original issue reported on code.google.com by [email protected]
on 2 Jul 2012 at 12:20
Per the RFC (paragraph 2.6), this should be legal:
"aaa","b CRLF
bb","ccc" CRLF
zzz,yyy,xxx
I think the way to fix this might be to check to see if reValue consumed the
entire line (check reValue.lastIndex). If not, see if it ended before a
(?:^|,)" (or maybe you have to use lookbehind). If so, splice the next line
onto this one, and pick up where we left off.
But you'll have to get it past the reValid check. Is that really needed? I
think a CSV line is not well-formed IFF it can't be parsed as a sequence of
values. I don't see that the validator regex is accomplishing anything useful?
Original issue reported on code.google.com by [email protected]
on 4 Sep 2012 at 9:38
[deleted issue]
Hi,
i forked and checked out the project on my mac and it went a bit crazy with the
crlf line endings...
To fix that i had to create a .gitattributes file, here's the commit:
https://code.google.com/r/thanpolas-jquery-csv/source/detail?r=733b531727e169a10
cd8743a78b5485d7d80466b&name=gitattributes-crlf-fix
Original issue reported on code.google.com by Thanpolas
on 29 Oct 2012 at 10:29
Basically when using this csv2array function, the returned array elements are
all of string type. If i want to use this utility in a situation where the
values in the array are to be interpreted as number/integers/floats/strings.
Then the code has to identify the data type and accordingly push the elements
into array. I have modified the source code to put my own code for this. The
added this code only to the portion which is relevant for me, and not very well
tested either. May be this can be a starting point for including this be
default. Attached is the code i modified.
Thanks,
Vikas
Original issue reported on code.google.com by [email protected]
on 26 Sep 2012 at 8:24
Attachments:
What steps will reproduce the problem?
1. Test with the attached csv file.
2.
3.
What is the expected output? What do you see instead?
There should be 19 lines but I see only 1 line. All the fields are flattened
into one line.
What version of the product are you using? On what operating system?
version 0.64, Mac OS
Please provide any additional information below.
We also tried the latest version 0.70 which seem to work on Mac OS but does not
work in firefox browser.
Original issue reported on code.google.com by [email protected]
on 7 Nov 2012 at 6:24
Attachments:
Branch name:
development
Purpose of code changes on this branch:
Add working implementations to the fromArrays() and fromObjects() method stubs.
After the review, I'll merge this branch into:
master
Location of the remote:
https://github.com/mirlord/jquery-csv
Original issue reported on code.google.com by [email protected]
on 7 Dec 2012 at 9:28
What steps will reproduce the problem?
1. Use my data in Firefox
2. use toObjects
My new data looks like this.
resNum,DataCol,ColorCol
16S:(1-8),4,purple
16S:(9-25);16S:(913-920),1,red
I use toObjects. This runs perfectly fine on my website and on the test website
in Chrome. It fails in Firefox. Firefox produces an all empty array. I need all
these punctuation marks.
Actually, I tried something simpler
w,r,t
2,4,purple
4,1,red
This isn't working in Firefox either. It's failing in 0.64 and it fails on the
Basic Usage Demo.
OK, I did some more testing for you. Firefox is requiring all data to be in
quotes.
toy,test,kelp
1,2,3
4,5,6
will not work, but
"toy","test","kelp"
"1","2","3"
"4","5","6"
will work
Quotes should be optional. I only put quotes around my data if the data
contains a comma.
Original issue reported on code.google.com by [email protected]
on 16 Oct 2012 at 10:23
[deleted issue]
What steps will reproduce the problem?
1. use the plugin ((i.e. by doing `jQuery.csv.toArrays(myReallyLargeCsvData)`)
What is the expected output? What do you see instead?
i really would need an option like `ignore: [3,4,5]` to ignore columns 4 to 6
in my file, for instance. Currently Scenario is:
a. the plugin crunches through all data in the csv, giving back a huge object
b. then i let it loop through the data again, doing some really slow
array.splice() functions on every row to get rid of the superfluous data, thus
freeing the memory.
So each way, the browsers suffers from performance or memory decrease whenever
there is data in the csv that it should ignore/throw away.
What version of the product are you using? On what operating system?
0.71 / Linux, Mac, Win
Original issue reported on code.google.com by [email protected]
on 20 Mar 2013 at 11:08
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
0.71.min.js, Win8
Please provide any additional information below.
loaded after <script
src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Original issue reported on code.google.com by [email protected]
on 23 Nov 2014 at 11:42
What steps will reproduce the problem?
Run in an html file with the following script:
$(document).ready(function() {
$.get( "report.csv", function(data){
console.log(data);
makeTable(data);
});
});
function makeTable(fi) {
var html = '<table class="table table-bordered">';
var data = $.csv.toArrays(fi);
for(var row in data) {
html += '<tr>\r\n';
for(var item in data[row]) {
html += '<td>' + data[row][item] + '</td>\r\n';
}
html += '</tr>\r\n';
}
// close table
html += "</table>";
// insert into div
$('#container').append(html);
} //makeTable
What is the expected output? What do you see instead?
It errors out with the error in the summary. I will attach the CSV.
What version of the product are you using? On what operating system?
0.71.min, running on osx 10.10, firefox.
Please provide any additional information below.
The document is retrieved but the parser errors out. When i run this same file
against your fileupload demo it handles the csv file so this is probably my
fault.
Original issue reported on code.google.com by [email protected]
on 4 Mar 2015 at 4:20
Attachments:
해당 구문 이구요.
###############################################################
// convert data to objects
for(var i=0, len=lines.length; i<len; i++) {
var entry = $.csv.toArray(lines[i], options);
var object = {};
for(var j in headers) {
object[headers[j]] = entry[j];
}
data.push(object);
// update row state
options.state.rowNum++;
}
################################################################
대략 다음과 같이 수정이 필요한것 같네요.
// convert data to objects
var headerCount = headers.length;
for(var i=0, len=lines.length; i<len; i++) {
var entry = $.csv.toArray(lines[i], options);
var object = {};
var j = 0;
for(;j < headerCount ; j++) {
object[headers[j]] = entry[j];
}
data.push(object);
// update row state
options.state.rowNum++;
}
##############################################################
수고하세요
Original issue reported on code.google.com by [email protected]
on 26 Nov 2013 at 12:47
The onParseEntry callback function provides plenty of scope to parse entries to
numerical values, Booleans, convert special cases to other values, etc, but
since it always skips a value when a hook to boolean false, you cannot use it
to handle values that parse to boolean false.
Repro example:
var ParseBool = function (value)
{
if (value == "true")
{
return true;
}
else if (value == "false")
{
return false;
}
else
{
return value;
}
}
var contentCSV = "index,isAwesome\n0,true\n,1,false";
var data = $csv.toObjects (contentCSV, {onParseValue : ParseBool});
This will produce a JSON array with two objects of structure { index :
someIntString, isAwesome : someBool }, one which looks like {index : "0",
isAwesome : true } and one that looks like {index : "1", isAwesome : 0 }.
It would be better is the library used undefined to decide when to skip a
value, or simply didn't have a skip-value check when parsing values, as it
makes less sense to skip parsing specific values than it does to skip entire
entries, for example. I've commented out the if hook !=== false line at 474 of
the source (in the endOfValue function of parseEntry) and it gives no
detrimental effects.
Original issue reported on code.google.com by [email protected]
on 11 Aug 2014 at 2:06
What steps will reproduce the problem?
1. when try to parse string receive error
String:
"School", "1601-1643 E Pythian St", "Dallas", "TX", "22334", 32.838058,
-97.017517
Error: Uncaught Error: CSVDataError: Illegal Quote [Row:1][Col:2]
Tested in Chrome
When remove [space] after , and string become
"School","1601-1643 E Pythian St","Dallas","TX","22334",32.838058,-97.017517
then plugin work how expected
Original issue reported on code.google.com by [email protected]
on 25 Dec 2012 at 3:55
What steps will reproduce the problem?
1. get or create a text file (text.txt) with two lines separated by 'CR'
character as line ending (Mac OS X ending line).
2. Go to http://jquery-csv.googlecode.com/git/examples/file-handling.html
3. Open your file, jquery-csv parse file content but separate line on \n char.
For exemple csv generated on mac with Excel doesn't work.
jquery-csv should handle csv file with \r or \n or \r\n line ending.
Original issue reported on code.google.com by VINCENT.guillaume.inp
on 20 Sep 2013 at 12:26
Attachments:
What steps will reproduce the problem?
1. Try parsing CSV data using a regex special char for either the
separator/delimiter.
The following regex should fix it but needs testing:
{{{strDelimiter = (strDelimiter || ",").replace(/([[^$.|?*+(){}])/g, '\\$1');}}}
Original issue reported on code.google.com by [email protected]
on 30 Apr 2012 at 8:51
What steps will reproduce the problem?
1. Don't include jQuery
2. Try to use jquery.csv.js
What is the expected output? What do you see instead?
1. Let $ be exported under these circumstances.
What version of the product are you using? On what operating system?
1. Trunk on Windows
Please provide any additional information below.
Attached is a patch.
Original issue reported on code.google.com by [email protected]
on 23 Feb 2014 at 11:47
Attachments:
Parsing a CSV file in IE7 is roughly 10x slower than in any other browser
(including IE8)
Original issue reported on code.google.com by [email protected]
on 9 Aug 2012 at 6:28
I tried importing the Excel file attached with the following code:
reader.onload = function(e){
var csv = e.target.result;
var csvArr = $.csv.toArrays(csv);
}
resulting in 'Error: CSVDataError: Illegal Data [Row:1][Col:1]'.
I noticed that most scripts use a regex like 'csv.split(/\r\n|\n/);', which
isn't working for this file. But the regex 'csv.split(/\r/g);' is. Don't know
if that is in any way related to the error above, but just in case...
Original issue reported on code.google.com by [email protected]
on 31 Aug 2014 at 9:06
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.