excel icon indicating copy to clipboard operation
excel copied to clipboard

Exception: null does not work for DoubleCellValue when using insertRowIterables

Open Kontrano opened this issue 1 year ago • 3 comments

I keep getting the error "Exception: null does not work for DoubleCellValue" when using the insertRowIterables Command the same thing happens when using a IntCellValue.

sheetObject.insertRowIterables([TextCellValue(name), DoubleCellValue(averageScore)], 5 + i); If i replace it with the following using updateCell it works fine

sheetObject.updateCell(CellIndex.indexByColumnRow(columnIndex: 0, rowIndex: 5+i), TextCellValue(name), cellStyle: normalStyle);
sheetObject.updateCell(CellIndex.indexByColumnRow(columnIndex: 1, rowIndex: 5+i), DoubleCellValue(averageScore), cellStyle: normalStyle);

Btw my normalSyle is only this:

var normalStyle = CellStyle(fontFamily: getFontFamily(FontFamily.Calibri));

Any idea why this is happening?

Im using: excel: ^4.0.2 archive: 3.4.9 flutter 3.16.5

Kontrano avatar Jan 29 '24 11:01 Kontrano

look at #313 I had the same error for both DoubleCellValue and DateCellValue pop up when saving (also datetime) what was mentioned there was a workaround for the issue and I suspect has the same root cause.

ChristopherLinnett avatar Jan 29 '24 12:01 ChristopherLinnett

I faced this issue with IntCellValue and DoubleCellValue. But when I applied the CellStyle like @Kontrano posted here, it works as expected. Is the maintainer @justkawal fixing this issue?

Jayasubin avatar Feb 22 '24 08:02 Jayasubin

Bump. Need a fix for this, please.

natgross avatar May 19 '24 16:05 natgross