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

Reading a cell with sheet.cell() changes the data to null #28

Closed
zakton5 opened this issue Jun 15, 2020 · 2 comments
Closed

Reading a cell with sheet.cell() changes the data to null #28

zakton5 opened this issue Jun 15, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@zakton5
Copy link

zakton5 commented Jun 15, 2020

Pretty strange issue here. This is my code. I'm essentially parsing a table

Test Upload.xlsx

final bytes = File(filePath).readAsBytesSync();
final excel = Excel.decodeBytes(bytes);
final defaultSheet = await excel.getDefaultSheet();
final sheet = excel[defaultSheet];
// Cell B1 is 60 here
final widthCell = sheet.cell(CellIndex.indexByColumnRow(columnIndex: 1, rowIndex: 0));
// But now it is null
print(widthCell.value);

There is code in cell() on line 104 and 105 of sheet.dart that seems to be causing this. It seems that is just isn't carrying the value over. Am I doing something wrong?

@justkawal justkawal self-assigned this Jun 15, 2020
@justkawal justkawal added the bug Something isn't working label Jun 15, 2020
@zaytri
Copy link

zaytri commented Jun 15, 2020

I've also experienced this, had to workaround by not using cell().

defaultSheet.row(0)[1].value

@justkawal
Copy link
Owner

Thanks @zakton5 for letting us know about this.

It's fixed now and will be updated in the new version by tomorrow: excel: ^1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants