tgui78 / excellibrary

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

Invalid Cell Value #152

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ExcelLibrary.DataSetHelper.CreateWorkbook(path, ds)
2.
3.

What is the expected output? What do you see instead?
Expect empty value

What version of the product are you using? On what operating system?
ExcelLibrary_20110730.zip   50.5 KB - Windows 7 64Bits

Please provide any additional information below.
The dataset has null fields.
The error occurs in the WorkSheetEncoder.cs in EncodeCell method. To solve the 
problem includes the following code:

else
{
     if (String.IsNullOrEmpty(cell.Value.ToString()))
     {
          LABELSST label = new LABELSST();
          label.SSTIndex = sharedResource.GetSSTIndex("");
          return label;
     }
     else
     {
          throw new Exception("Invalid cell value.");
     }
}

Original issue reported on code.google.com by leste...@gmail.com on 26 Sep 2013 at 6:49