Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated xlsx file with column range out of bounds #1350

Closed
islotwin opened this issue Jun 24, 2021 · 1 comment
Closed

Generated xlsx file with column range out of bounds #1350

islotwin opened this issue Jun 24, 2021 · 1 comment

Comments

@islotwin
Copy link

AlaSQL is based on unpaid voluntary work. Thank you for taking the time to make it better.

Problem: Generated xlsx file in alasql has more columns in range than actual data. The same file passed through another program (i.e. google docs) returns right number of columns.
I think it comes from the fact, that in alasql columns are indexed starting with 0 (https://github.com/agershun/alasql/blob/develop/src/15utility.js#L1153). However, the end range is calculated basing on columns.length (https://github.com/agershun/alasql/blob/develop/src/833xlsx.js#L123). So, end range is actually out of bounds. Is it intended behavior?

Example: For file with data in columns "A" and "B" expected range would be "A:B". Received range is "A:C".

Reproduction: https://jsfiddle.net/mujsr8zy/6/

File passed through google spreadsheets: example-2.xlsx

@mathiasrw
Copy link
Member

Released as part of https://github.com/AlaSQL/alasql/releases/tag/v2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants