DiegoZoracKy / convert-excel-to-json

Convert Excel to JSON, mapping sheet columns to object keys.
MIT License
287 stars 91 forks source link

To include header row even when it's specified #36

Open hendryang opened 4 years ago

hendryang commented 4 years ago

Hi folks, thanks for this awesome lib.

is it possible to also include the "Row" that has been specified as header ( header:{rows:1} ) in the result ?

Sample use case: I set header:{rows:2} , and i need to retrieve if all the column headers are correct for assertion (eq those in row 2). currently once it's specified as header, the data will be removed from the result hence i cannot do the assertion. the reason i need to specify header is mainly for {{columnHeader}} in columnToKey

thanks

DiegoZoracKy commented 4 years ago

Hi @hendryang,

Tell me a bit more about the assertion step. Do you want to match the headers found on row 2 with some list that you have prior to run the conversion?