objects-to-csv icon indicating copy to clipboard operation
objects-to-csv copied to clipboard

added delimiter options

Open repiatx opened this issue 5 years ago • 4 comments

Thank you for your hard work and i appricate if you can add this

repiatx avatar Apr 19 '20 23:04 repiatx

Will this ever be implemented? 😢

nealoke avatar Oct 01 '20 10:10 nealoke

Will this ever be implemented? 😢

dunno :) i did my best. :D

repiatx avatar Oct 01 '20 11:10 repiatx

@anton-bot this library still actively maintained?

I have 1.3.6 version on my backend and I need to change , separator with ; , so i tried to pass it as an options like this below, but it doesn't seem to work :(

const ObjectsToCsv = require('objects-to-csv');
const CoreModules = require('../../core');

/* ... more code here... */

const file = await new ObjectsToCsv(list).toDisk(`${CoreModules.Configuration.CSV.CSV_FOLDER_PATH}/${filename}.csv`, {
    bom: true,
    delimiter: ';'
  });

Thanks anyway for you work!

guizzo avatar Nov 20 '21 15:11 guizzo

@anton-bot this library still actively maintained?

I have 1.3.6 version on my backend and I need to change , separator with ; , so i tried to pass it as an options like this below, but it doesn't seem to work :(

const ObjectsToCsv = require('objects-to-csv');
const CoreModules = require('../../core');

/* ... more code here... */

const file = await new ObjectsToCsv(list).toDisk(`${CoreModules.Configuration.CSV.CSV_FOLDER_PATH}/${filename}.csv`, {
    bom: true,
    delimiter: ';'
  });

Thanks anyway for you work!

Hello @guizzo I tried to pass the parameter, but didn't worked out for me too. I ended up forking the repo and implementing it myself.

Here it is. Hope it's useful for someone: https://www.npmjs.com/package/objects-to-csv-delimited

npm i objects-to-csv-delimited

jandersonclemente avatar Nov 24 '21 00:11 jandersonclemente