C2fo
c2fo.github.io › fast-csv › docs › parsing › examples
Examples | Fast-CSV
JavaScript Examples Source · TypeScript · JavaScript · Output · Copy · import { parse } from '@fast-csv/parse'; const stream = parse({ headers: true }) .on('error', error => console.error(error)) .on('data', row => console.log(row)) .on('end', (rowCount: number) => console.log(`Parsed ${rowCount} rows`)); stream.write('header1,header2\n'); stream.write('col1,col2'); stream.end(); You can provide a delimiter option to change the delimiter from a , character.
Snyk
snyk.io › advisor › fast-csv › fast-csv code examples
Top 5 fast-csv Code Examples | Snyk
const fs = require('fs'); const csv = require('fast-csv'); require('sepia'); /* eslint import/no-extraneous-dependencies: [0] */ require('dotenv').config(); const twitter = require('../common/lib/twitter'); // const { getRank } = require('../common/lib/similarweb.js'); const filename = './common/data/dapps.csv'; const apps = []; csv .fromPath(filename, { headers: true, }) .on('data', async (data) => { apps.push(data); }) .on('end', async () => { await twitter.fetchMentions(apps); const writeStream = fs.createWriteStream('./common/data/dapps-ranked.csv'); csv.write(apps, { headers: true }).pipe(writeStream); console.log('done'); });
Videos
50:56
Efficient CSV Parsing - On the Complexity of Simple Things - Pedro ...
21:21
Parsing a CSV file with JavaScript - YouTube
10:05
Playwright (NODEJS) Reading and Writing to a CSV - YouTube
15:02
How to Use ChatGPT to Learn Anything FAST (Speed Learning) - YouTube
04:52
How to use the Fast Scanner App - YouTube
23:25
Delphi and Fast Report 6: How to Use Them for Your Own Projects ...
GitHub
github.com › C2FO › fast-csv
GitHub - C2FO/fast-csv: CSV parser and formatter for node · GitHub
Starred by 1.8K users
Forked by 216 users
Languages TypeScript 99.0% | JavaScript 1.0%
npm
npmjs.com › package › fast-csv
fast-csv - npm
May 6, 2026 - CSV parser and writer. Latest version: 5.0.7, last published: 2 months ago. Start using fast-csv in your project by running `npm i fast-csv`. There are 958 other projects in the npm registry using fast-csv.
» npm install fast-csv
Published May 06, 2026
Version 5.0.7
C2fo
c2fo.github.io › fast-csv › docs › introduction › example
Quick Examples | Fast-CSV
TypeScript Source · Javascript Source · TypeScript · JavaScript · Output · Copy · import * as csv from 'fast-csv'; const csvStream = csv.format({ headers: true }); csvStream.pipe(process.stdout).on('end', () => process.exit()); csvStream.write({ header1: 'row1-col1', header2: 'row1-col2' ...
Tabnine
tabnine.com › home › code library
Code Library - Tabnine
July 25, 2024 - Get the answers and suggestions you need from our AI code assistant. Get started in minutes with a free 90 day trial of Tabnine Pro.
Snyk
snyk.io › advisor › fast-csv › functions › fast-csv.format
How to use the fast-csv.format function in fast-csv | Snyk
return new Promise((resolve, reject) => { options = options || {}; // const encoding = options.encoding || 'utf8'; // const separator = options.separator || ','; // const quoteChar = options.quoteChar || '\''; const worksheet = this.workbook.getWorksheet(options.sheetName || options.sheetId); const csvStream = fastCsv.format(options); stream.on('finish', () => { resolve(); }); csvStream.on('error', reject); csvStream.pipe(stream); const {dateFormat, dateUTC} = options; const map = options.map || (value => { if (value) { if (value.text || value.hyperlink) { return value.hyperlink || value.text || ''; } if (value.formula || value.result) { return value.result || '';
FastCSV
fastcsv.org › guides › basic
Basic Tutorial | FastCSV
This section covers the most basic usage of FastCSV. It provides examples for reading and writing CSV data.
Repository https://github.com/osiegmar/FastCSV
C2fo
c2fo.io › fast-csv › docs › formatting › examples
Examples | Fast-CSV
The writeHeaders option can be useful when appending to a csv to prevent writing headers twice. See the append example · If writeHeaders is set to false, headers is set to true, and your rows are arrays, the first row will not be written. In this example the auto discovered headers are not written. ... In this example the headers are provided to specify order of columns but they are not written. ... Sometimes you may need to quote columns in a certain ways in order to meet certain requirements. fast...
CodeSandbox
codesandbox.io › examples › package › fast-csv
fast-csv examples - CodeSandbox
Use this online fast-csv playground to view and fork fast-csv example apps and templates on CodeSandbox.
Npmdoc
npmdoc.github.io › node-npmdoc-fast-csv › build › apidoc.html
CSV parser and writer
... * `data`: Emitted with the object or `stringified` version if the `objectMode` is set to `false`. **`([options])` or `.parse(options)`** If you use `fast-csv` as a function it returns a transform stream that can be piped into. ```javascript var stream = fs.createReadStream("my.csv"); var csvStream = csv() .on("data", function(data){ console.log(data); }) .on("end", function(){ console.log("done"); ... description and source-code · function createWriteStream(options) { return new CsvTransformStream(options); } example usage ·
GitHub
gist.github.com › basperheim › 1a230cdbcbc5dd54d9145e59d4f1df72
Create a CSV file using NodeJS and fast-csv · GitHub
Another example that passes an an nested array of row arrays with set headers: #!/usr/bin/env node 'use strict'; const fs = require('fs'); const path = require('path'); const csv = require('fast-csv'); /** * Writes data stored in an object literal to a CSV file path **/ const createCsv = (data, filename) => { const csvFile = path.resolve(__dirname, filename); // pass the array of headers to format() method const csvStream = csv.format({ headers: data.headers }); // loop over nested row arrays const arr = data.rows; for (let i = 0; i<arr.length; i++) { let row = arr[i]; csvStream.write( row );
C2fo
c2fo.github.io › fast-csv
Fast-CSV | Fast-CSV
CSV Parser and Formatter · Get Started · Built on top of the Node.js Stream API, so you can work with APIs you are familiar with. Out of the box formatting and parsing of any delimiter separated file.
FastCSV
fastcsv.org › guides › quickstart
Quick Start Guide | FastCSV
To iterate over CSV records in a file and print them to the console, use the following code snippet: ... Both methods (ofCsvRecord and ofNamedCsvRecord) are overloaded for other input sources like String, Reader and InputStream as well. Using the more generic build method, you can also make use of the Callback mechanism to process the records. See Custom callback handler example for more information.
Repository https://github.com/osiegmar/FastCSV
Snyk
snyk.io › advisor › fast-csv › functions › fast-csv.parse
How to use the fast-csv.parse function in fast-csv | Snyk
December 28, 2022 - const datumNumber = Number(datum); if (!Number.isNaN(datumNumber) && datumNumber !== Infinity) { return datumNumber; } const dt = dayjs(datum, dateFormats, true); if (dt.isValid()) { return new Date(dt.valueOf()); } const special = SpecialValues[datum]; if (special !== undefined) { return special; } return datum; }; const csvStream = fastCsv.parse(options) .on('data', data => { worksheet.addRow(data.map(map)); }) .on('end', () => { csvStream.emit('worksheet', worksheet); }); return csvStream; }
C2fo
c2fo.github.io › fast-csv › docs › introduction › getting-started
Getting Started | Fast-CSV
Fast-csv is library for parsing and formatting CSVs or any other delimited value file in node.