node-csvtojson icon indicating copy to clipboard operation
node-csvtojson copied to clipboard

CSV file has two header rows

Open IrishAdo opened this issue 7 years ago • 1 comments

Hi,

I would like to request two new functions

.headerRow(x) .skipRow(x)

I have for example a csv that has two rows that are header information

col1,col2,col3
----,----,----
a,b,c
d,e,f

I would like a function skipRow(x) that would work as follows

csv()
.skipRow(2)
.then(...

and also like

csv()
.skipRow(2)
.skipRow(3)
.skipRow(4)
.then(...

I would also like to be able to define that the header is on a different row from row 1

----,----,----
col1,col2,col3
----,----,----
a,b,c
d,e,f

so

csv()
.headerRow(2)
.skipRow(1)
.skipRow(3)
.then(...

Thanks Ado

IrishAdo avatar Oct 04 '18 11:10 IrishAdo

This is regarding the headerRow feature. @IrishAdo You expect to ignore data above the header row ? ie when headerRow set to 2, are row 1 and 2 ignored?

RimashMohomed avatar Jul 10 '19 12:07 RimashMohomed