Export to GitHub

excellibrary - issue #97

Error with Dataset


Posted on Jun 21, 2011 by Happy Hippo

What steps will reproduce the problem? 1. When the dataset has null values in the any columns it crashed 2. 3.

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

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

Please provide any additional information below.

Comment #1

Posted on Jun 23, 2011 by Grumpy Kangaroo

In DataSetHelper.CreateWorkbook, why not use this ?

 // Populate row data
 for (int j = 0; j < dt.Rows.Count; j++)

+ { + if (Convert.IsDBNull(dt.Rows[j][i])) + worksheet.Cells[j + 1, i] = new Cell(String.Empty); + else worksheet.Cells[j + 1, i] = new Cell(dt.Rows[j][i]); + }

Comment #2

Posted on Aug 9, 2011 by Grumpy Elephant

In addition to pagirre's change, you also have to change EncodeCell in WorkSheetEncoder. Add this case:

else if (Convert.IsDBNull(value)) { LABELSST label = new LABELSST(); label.SSTIndex = sharedResource.GetSSTIndex(""); return label; }

Status: New

Labels:
Type-Defect Priority-Medium