Comments (4)
could you give me an example, there is an 'end' event, but are u thinking about something like
csv(text, function(data){});
from node-csv.
Exactly. My example
csv()
.fromPath(tmp_path, {
columns :true,
delimiter : ';',
trim : true
})
.on('data', function(data, index){
execute something on data
// Last treatmennt on data
if (index === last row)
callback;
})
.on('error', function(error){
throw error;
})
.on('end', function(){
// End of reading
});
from node-csv.
then it should work, look at the "samples/sample.js", and should look like:
csv()
.fromPath(tmp_path, {
columns :true,
delimiter : ';',
trim : true
})
.on('data', function(data, index){
execute something on data
})
.on('error', function(error){
throw error;
})
.on('end', callback);
from node-csv.
I'm closing, If u're still having the problem with the 0.2 version, please re-open the issue and we'll write a sample file which reproduce your problem.
from node-csv.
Related Issues (20)
- Broken link in doc page HOT 1
- CSV parsing and stringify do not produce equivalent items HOT 2
- Tests are NOT a good source of inspiration, examples, and supported features HOT 1
- Auto parses a string as a number HOT 2
- Example in README doesn't appear to do anything HOT 1
- Error isn't properly caught or returned when attempting to parse an image HOT 3
- Docs: Async example for parsing a large CSV via streams HOT 4
- Package subpath './lib/sync' is not defined by "exports" in ... csv-stringify/package.json HOT 3
- Luxon datetimes get redundant quotes around them HOT 5
- stringify `header` and `cast` options: "no overload matches this call" HOT 2
- The last line is always skipped HOT 2
- document: how to detect types? eg string vs number HOT 6
- Relax / relax_quotes not working HOT 2
- Support for Node 20.x HOT 3
- Request for a Reliable Transformer to Parse Large CSV Files in Browser Environment HOT 2
- csv-parse cross pollinates configuration between instances HOT 2
- Delimiter Discovery HOT 9
- YYYY-01-01 getting parsed as the previous year HOT 1
- a solution to repair rows when using columns HOT 1
- Link to Pipe recipe in docs is broken. HOT 2
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 node-csv.