Giter Site home page Giter Site logo

jquery-csv's People

Contributors

awnage avatar coltonehrman avatar evanplaice avatar fgerschau avatar garemoko avatar ishitajain avatar jason-cooke avatar powerpaul17 avatar pvnr0082t avatar zsoltime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-csv's Issues

TypeError: csv.replace is not a function

From [email protected] on March 04, 2015 08:20:55

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 = '

';
var data = $.csv.toArrays(fi);
for(var row in data) {
html += '\r\n';
for(var item in data[row]) {
html += '\r\n';
}
html += '\r\n';
}
// close table
html += "
' + data[row][item] + '
";

// 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.

Attachment: report.csv

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=48

CR line ending are not well treated

From VINCENT.guillaume.inp on September 20, 2013 05:26:58

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).

  1. 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.

Attachment: text.txt

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=31

Passing empty CSV file to function toObjects() breaks the code

From [email protected] on June 05, 2013 07:38:26

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: http://code.google.com/p/jquery-csv/issues/detail?id=28

CSVDataError: Illegal State - Only in IE

From [email protected] on April 04, 2014 09:32:22

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: http://code.google.com/p/jquery-csv/issues/detail?id=39

Using Zurb Foundation 3 causing an error

From [email protected] on April 15, 2014 11:45:16

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: http://code.google.com/p/jquery-csv/issues/detail?id=40

Latest version fails to recognise line endings on Mac

From [email protected] on November 06, 2012 22:24:52

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.

Attachment: test csv.csv

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=17

New Firefox bug

From [email protected] on October 16, 2012 15:23:20

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: http://code.google.com/p/jquery-csv/issues/detail?id=14

Uncaught ReferenceError: require is not defined

From [email protected] on November 23, 2014 15:42:24

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: http://code.google.com/p/jquery-csv/issues/detail?id=45

Typo in basic-usage.html (fixed in 0.8.0)

From ranhiru on October 01, 2013 22:13:49

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: http://code.google.com/p/jquery-csv/issues/detail?id=32

Options arg not really optional?

From [email protected] on February 14, 2015 20:39:25

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: http://code.google.com/p/jquery-csv/issues/detail?id=47

chrome crashes with: "Aw, Snap!" on large CSV files

From [email protected] on November 25, 2012 15:19:46

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: http://code.google.com/p/jquery-csv/issues/detail?id=19

Mac end of lines

From [email protected] on May 29, 2013 18:06:37

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.

Attachment: test.csv test2.csv

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=27

CSV file created with Excel for Mac fails

From [email protected] on August 31, 2014 14:06:31

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...

Attachment: xlsx-file-upload-test-file-email.csv

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=44

import of CSV with only one column and no new line char at last line will omit the last entry

From [email protected] on January 21, 2013 23:45:34

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.

Attachment: tester.csv

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=23

Firefox aint working properly

From [email protected] on July 02, 2012 05:20:42

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: http://code.google.com/p/jquery-csv/issues/detail?id=5

colNum not reset when onParseValue callback called

From [email protected] on January 20, 2014 23:03:52

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.

Attachment: testcase.js

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=37

Node.js module?

Hi, great piece of software. Any plans on making a Node Package Module?

Parse doesn't handle quotes in the CSV, even if escaped

From [email protected] on April 25, 2014 10:40:41

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: http://code.google.com/p/jquery-csv/issues/detail?id=42

Data Format

From [email protected] on July 15, 2015 22:52:21

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.

Attachment: data.csv googlemotin.html

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=49

using gviz http://jsfiddle.net/asgallant/edT7T/7/ error

From [email protected] on October 24, 2012 12:31:47

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: http://code.google.com/p/jquery-csv/issues/detail?id=15

String parse error

From [email protected] on December 25, 2012 07:55:42

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: http://code.google.com/p/jquery-csv/issues/detail?id=21

Identify data type and then push into array (in case of csv2array)

From [email protected] on September 26, 2012 01:24:16

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

Attachment: jquery.csv.js

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=9

Hooks relying on a return value of false to skip entries makes parsing values that resolve to false impossible

From [email protected] on August 11, 2014 07:06:16

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: http://code.google.com/p/jquery-csv/issues/detail?id=43

toArrays method does not work in IE9

From [email protected] on November 19, 2012 08:54:57

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: https://code.google.com/p/jquery-csv/source/browse/src/jquery.csv.js?spec=svn5eacc4afc1d55714e45e2ceb891f930e0092c6f5&r=5eacc4afc1d55714e45e2ceb891f930e0092c6f5#659

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=18

SCRIPT438: Object doesn't support property or method 'replace': jquery.csv-0.64.js, line 220 character 7

From [email protected] on October 10, 2012 13:14:35

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: http://code.google.com/p/jquery-csv/issues/detail?id=12

[IMPROVEMENT] Add option to skip certain columns (eg. identified by index)

From [email protected] on March 20, 2013 16:08:25

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: http://code.google.com/p/jquery-csv/issues/detail?id=25

unable to require jQuery-csv from node

From [email protected] on September 27, 2012 07:37:15

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: http://code.google.com/p/jquery-csv/issues/detail?id=10

배열의 기본 속성값(remove)이 포함 됩니다.

From [email protected] on November 25, 2013 16:47:09

해당 구문 이구요.

###############################################################
// 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: http://code.google.com/p/jquery-csv/issues/detail?id=34

doesn't seem to recoginse end of line properly in some cases.

From [email protected] on September 10, 2013 11:58:21

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: http://code.google.com/p/jquery-csv/issues/detail?id=30

Ignoring empty cells

From [email protected] on September 04, 2012 16:40:43

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: http://code.google.com/p/jquery-csv/issues/detail?id=8

$.csv.parsers.splitLines(csv) does not work

From [email protected] on April 07, 2013 11:09:09

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: http://code.google.com/p/jquery-csv/issues/detail?id=26

Karma test fails -

From [email protected] on November 30, 2013 15:26:10

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: http://code.google.com/p/jquery-csv/issues/detail?id=35

Failures on test.html file

From [email protected] on January 16, 2014 23:11:02

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. ( 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. ( http://jquery-csv.googlecode.com/git/test/test.html:240:5 )

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=36

$.csv.toObjects return garbage value

From [email protected] on April 17, 2014 09:22:00

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: http://code.google.com/p/jquery-csv/issues/detail?id=41

CSV values with embedded newlines do not work.

From [email protected] on September 04, 2012 02:38:02

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: http://code.google.com/p/jquery-csv/issues/detail?id=7

Export $ globally in browser when not already set

From [email protected] on February 23, 2014 15:47:54

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.

Attachment: jquery.csv.js-export.patch

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=38

Generate Motion chart

From [email protected] on February 08, 2015 09:23:00

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

Attachment: ccc.csv

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=46

Freaks over over extra blank lines

From [email protected] on October 10, 2012 13:42:48

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: http://code.google.com/p/jquery-csv/issues/detail?id=13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.