dylan-mo / excellibrary

Automatically exported from code.google.com/p/excellibrary
0 stars 0 forks source link

System.OverflowException with large numerical values #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Populate a cell with a large value (9,999,999 for example)
2. Try to save Workbook

What is the expected output? What do you see instead?

Error Type: System.OverflowException
Error Source: mscorlib
Error Message: Value was either too large or too small for a UInt32.
Stack Trace:    at System.Decimal.ToUInt32(Decimal d)
   at System.Decimal.op_Explicit(Decimal value)
   at ExcelLibrary.BinaryFileFormat.WorkSheetEncoder.EncodeCell(Cell cell, 
SharedResource sharedResource)
   at ExcelLibrary.BinaryFileFormat.WorkSheetEncoder.Encode(Worksheet 
worksheet, SharedResource sharedResource)
   at ExcelLibrary.BinaryFileFormat.WorkbookEncoder.EncodeWorkbook
(Workbook workbook)
   at ExcelLibrary.BinaryFileFormat.WorkbookEncoder.Encode(Workbook 
workbook, Stream stream)
   at ExcelLibrary.SpreadSheet.Workbook.Save(String file)

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by simonsam...@googlemail.com on 30 Jun 2009 at 12:00

GoogleCodeExporter commented 8 years ago
File version shows as 1.0.0.0. Windows XP. VB.Net 2005.

Original comment by simonsam...@googlemail.com on 8 Jul 2009 at 11:43

GoogleCodeExporter commented 8 years ago
I tried worksheet.Cells[2, 0] = new Cell(9999999); nothing wrong. Please use 
latest 
code.

Original comment by China.LiuJunFeng on 29 Jul 2009 at 7:34

GoogleCodeExporter commented 8 years ago
Agree, it all seems to work fine with the new download.

Original comment by simonsam...@googlemail.com on 31 Jul 2009 at 10:13