This project is read-only.
1
Vote

Negative decimal values throw error

description

If you pass negative decimal number as a cell value, you get Overflow exception.

comments

gius wrote Jul 3, 2012 at 10:18 AM

This is caused by Lite.ExcelLibrary.BinaryFileFormat.WorkSheetEncoder.EncodeCell as it contains:

...
else if (value is decimal)
{
RK rk = new RK();
rk.Value = (uint)((decimal)value * 100) << 2 | 3; // integer and mul
return rk;
}
...

Workaround is to convert decimal do double before sending it to ExcelLite (if possible).

wrote Feb 14, 2013 at 8:25 PM