Worms David

Results 251 comments of Worms David

> Is the idea that the skipped lines aren't even being considered as valid CSV ie. this parser can be used to pull out a CSV from a greater file...

I tend to say, if it is not tested, it is not a feature. Well, it is [tested](https://github.com/adaltas/node-csv-parse/blob/master/test/option.from_line.coffee#L122-L130) so it is officially supported and we shall stick to it.

It is also documented: https://csv.js.org/parse/options/from_line/#simple-example-with-inferred-column-names

Could you edit you issue with a valid markdown syntax using triple backticks, thank you

The doc is wrong. In the current implementation, by "empty", we really mean empty, no spaces, no tabs. Let me see if I can do sth about it

You can combine `skip_lines_with_empty_values` and `relax_column_count`. Would that works for you ? I'll fix the doc

Then your solution with `trim` shall be appropriate.

In your exemple above, you could delegate the escape work to the library: ```js cast: { string: s => {value: s, quoted: s.match(/^[=+\-@]/) }, } ```

This being said, we could introduce a new option, `safe_spreadsheet` or anything else if the usecase is shared among several user. Any suggestion for the name of the option ?

I don't have excell on my host but with libreoffice, `"=test"` is broken as well and `="=test"` is a correct solution.