mholt / PapaParse

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

Header = true not working #1061

Closed atinyasian closed 4 months ago

atinyasian commented 4 months ago

When setting the header in config to "true", the first row will not be interpreted as field names correctly.

this.#csvParser.parse(this.currentData, { delimiter: "", newline: "", header: true, dynamicTyping: false, complete: (results) => { console.log("Results: ", results.data); this.headerRow = results.data.splice(0,1)[0]; this.csvContent = results.data; }

Result, if header = "true":

error_header_config_result

Result, if header = "false":

error_header_config_result_correct

This is the csv file:

error_header_config
pokoli commented 4 months ago

What you are posting is the expected behaviour.