DiegoZoracKy / convert-excel-to-json

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

Issues with reading values of column after Z in the excel. #42

Open MinoEclairs opened 4 years ago

MinoEclairs commented 4 years ago

Hello! I am trying to read data after 'Z' column in my code. below is my code const bSDealDatas = excelToJson({ sourceFile: appDataXLSX, header: { rows: 1 }, sheets: [{ name: 'spotDealData', range: 'A2:AA2' }, ], columnToKey: { '*': '{{columnHeader}}' } }); appDataXLSX is the path of my excel file. if I defined range A2: Z2 is it works fine but when I try to give A2: AA2 it gives undefined on all cell values after A2.

Kindly tell me how to read cell values of column AA, AB, etc of the excel. Any Immediate help would be appreciated as I am stuck.

BMarrant commented 3 years ago

I also saw this bug when reading Z2:AA5. Workaround for me was inserting a blank column before Z (so then reading AA2:AB5) worked for me as I only needed those two columns.

It seems like going across the boundary of Z->AA is the problem, so might just want to leave all before AA blank if you need to read more than 26 columns at once.

If changing the sheet is not an option, then I'm not sure there is a workaround without a code change.