mholt / PapaParse

Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
http://PapaParse.com
MIT License
12.47k stars 1.14k forks source link

skipFirstNLines is documented but not released #1040

Open SamTolmay opened 7 months ago

SamTolmay commented 7 months ago

It looks like the skipFirstNLines config option is shown in the documentation, but it is not part of the latest release (5.4.1 as of the time of posting this)

n8udd commented 7 months ago

Just had the same issue.

Tried installing the latest branch, but the method doesn't appear to exist/work.

Gonzalomorales1001 commented 7 months ago

Just had the same issue.

Tried installing the latest branch, but the method doesn't appear to exist/work.

If anyone has an alternative solution, please tell us.

michalrozekariane commented 7 months ago

Same goes here.

jkruke commented 7 months ago

Just had the same issue.

Tried installing the latest branch, but the method doesn't appear to exist/work.

If anyone has an alternative solution, please tell us.

My current workaround to skip the first 5 lines of the CSV file:

const skipFirstNLines = 5;
const options = {beforeFirstChunk: chunk => [...chunk.split('\n').slice(skipFirstNLines)].join('\n')};
papa.parse("myfile.csv", options);