Comments (3)
From [email protected] on December 26, 2012 23:34:26
Not surprising, your input contains illegal data.
According to the CSV spec, whitespace contained outside of a proper delimiter is considered illegal. Come to think of it, I could probably improve the error handling to explain as much.
So for:
"School", "1601-1643 E Pythian St"
The space denoted by # is causing your issue:
"School",#"1601-1643 E Pythian St"
Note: The error clearly explains the issue. The first illegal instance is found in the second value of the first row.
It's an easy fix by hand but if you have a large data set with 'whitespace issues' it might be easher/quicker to write a preprocessor to handle the cleanup.
If that's what you need, let me know and I'll consider it as a new feature request. I doubt you'll be the last person who has this issue so it's within the best interest of the project to provide a solution.
If you'd like to write one yourself I can help too. I need to first add the preParse() callbacks but the rest can be handled by a single hook function. In fact, it shouldn't take a lot of effort to adapt the $.csv.parsers.splitLines() to accomplish what you're asking.
Let me know the approach you'd like to take.
Status: Invalid
Owner: [email protected]
Labels: -Priority-Medium Priority-Low
from jquery-csv.
From [email protected] on December 27, 2012 06:58:19
I know that [space] create problems, but we know that if column contain [space] he will be wrapped with "" this mean that ',[space]' or '[space],' also must be accepted as delimiter and in my case are very easy to fix this. otherwise let consider it as a new feature request. I like it and don't have any pretensions.
from jquery-csv.
From [email protected] on January 24, 2013 20:28:50
Consider this an accepted feature request.
I'm not exactly sure how to merge issues but you can follow the development on Issue 22 .
from jquery-csv.
Related Issues (20)
- How to trim columns with empty headers HOT 1
- spec(Add Missing Tests) HOT 1
- spec(Create New Demo Template and Migrate the Existing Examples to it) HOT 1
- Link to basic usage demonstration is broken HOT 2
- The Post-1.0 Future HOT 9
- Update CDNJS? HOT 4
- v1.0.1+ triggers NPM install EISGIT error HOT 3
- Fix security vulnerability HOT 1
- As simple standard CSV-reader what is better? HOT 1
- isFileAPIAvailable is not defined HOT 2
- Add jquery.csv.min.js not recognized by minify HOT 6
- multiple problems with newlines in cells HOT 1
- broken example for file handling HOT 4
- Tab as delimiter breaks parsing HOT 1
- csv.replace HOT 1
- toArrays() of single field file appears to omit the final row HOT 3
- Documentation error HOT 2
- Conversion error in .toObjects()
- $ is not defined HOT 1
- toObject Basic Usage Sample Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-csv.