Questions tagged [fast-csv]

Fast-csv on GitHub is a library that provides CSV parsing and formatting for node applications.

It uses the MIT license.

As of v0.2.0 fast-csv supports multi-line values.

58 questions
1
vote
1 answer

Cannot push arrays to array - fast-csv, nodejs

I'm using fast-csv npm package to parse incoming csv file and catching event data and displaying row is absolutely OK. I got what I want here. What I've done: fs.createReadStream(req.file.path) .pipe(csv.parse({ ignoreEmpty: true, trim: true…
Htet Phyo Naing
  • 464
  • 7
  • 20
1
vote
0 answers

How to save coordinates in a csv file from an android app?

I am working on a project where I want to collect sensor data with coordinates and save them to a csv file. The app was working perfectly before I started coding for getting the location. I am using location manager but every time I install this app…
harry r
  • 786
  • 2
  • 6
  • 19
1
vote
1 answer

Fast-CSV - Reorder columns of array object

I am using fast-csv to generate a CSV file from an array of objects and I would like to change the order of the columns. I tried setting the headers manually and while they appear in the correct order the headings don't match the column content. I…
ServerMonkey
  • 1,042
  • 3
  • 19
  • 42
1
vote
0 answers

Progress bar to include in EJS

I am uploading a csv file using fast-csv and then submitting all its rows in fileRows Array. Next I am rendering my webpage: res.on('end', function () { res.render("execute", {fileRows}) }); Here ejs is processing my file by matching with…
1
vote
1 answer

Node.js: Return promises in a defined order

I have some hundreds of JSON files that I need to process in a defined sequence and write back the content as CSV in the same order as in the JSON files: Write a CSV file with header Collect an array of JSON files to process Read the file and…
Sineos
  • 13
  • 3
1
vote
0 answers

Sending response to ipcRenderer from ipcMain after asynchronous operation completes

I'm learning Electron by writing the app that should parse and analyze .csv files. As a frontend part of it I'm using Vue.js. Initial functionality should be next: user selects a file, main process parses it, file's summary displayed at the client…
0
votes
0 answers

File not downloading using fast-csv, download shows but it does not get complete

I'am trying to download the student data to the client side using fast-csv and as the downloding url is hit and below function called, the download shows in the browser but it never get completed what should i do? here is the function to download…
0
votes
0 answers

Scramjet with xlsx

Is it possible to use scramjet with xlsx files? I have seen scramjet implementation with csv's such as fast-csv. Data-streams of scramjet with fast-csv can read row by row which are then used as per need while with xlsx we have to read the whole…
Shahab Ali
  • 389
  • 1
  • 3
  • 23
0
votes
0 answers

How can I parse uploaded csv file and store it in postgres using node js

I can parse csv file from a folder locally using node js and fast-csv package. Then, I have extract the headers and query Insert into postgres. const fs = require("fs"); const path = require("path"); const csv = require("fast-csv"); const pool =…
0
votes
0 answers

response.download("file") sending empty file. NodeJs, express

So, I have this function that read from a file, process the data and Writes to another, and then I do: response.status(200).download("data/out.csv"); The file generates fine locally, but is empty when I call the route, I tried all the events:…
0
votes
1 answer

how to correctly return data from async function node js, jest error

I have a function something like that: async function example(){ let data = await another_function(); var ws = fs.createWriteStream('path'); let jsonData = [{'id':'1234', 'name': 'Alex'}]; fastcsv .write(jsonData, { headers: true }) …
Sara
  • 41
  • 4
0
votes
0 answers

download csv to browser downloads node.js

I have this code: fs = require("fs"); var downloadData = "select * from PRODUCTS" ibmdb.open(req.session.ibmdbconnDash, function (err, conn) { if (err) return console.log(err); conn.query(downloadData, function (err, rows)…
devdude19289
  • 151
  • 1
  • 10
0
votes
1 answer

Why downloading a file from node.js server multiple times results in empty files

I am glad to get some help. Here is my problem: I have built a web server with node.js that should send a csv file to the client when requested through a certain route. The csv file is created from json using the fast-csv package. The json data…
Manuel
  • 3
  • 2
0
votes
1 answer

How do I write special characters to csv file in node with fast-csv

I have a list that contains German characters and I write to csv file with fast-csv and gives me different characters. import { writeToPath } from "fast-csv"; const data = [ { "name": "Ästhetik Zahnarzt Hamburg City Z-24 Mö 17 / Dr. P.…
Wrath
  • 29
  • 5
0
votes
0 answers

How can I store a large dataset result by chunks to a csv file in nodejs?

I have a mysql table of about 10 Million records, I would like to send those records to a csv file using NodeJs. I know I can make a query to get all records, store the result in a json format variable and send those to a csv file using a library…
fpelaezt
  • 1
  • 1