darknessomi / darknessomi/excellibrary

Invalid Cell Value

Open
#152 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
C#
Stars
22
Forks
8
PR merge metrics
No merged PRs in 30d

Description

```
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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in WorkSheetEncoder.cs at the EncodeCell method and reproduce the issue through ExcelLibrary.DataSetHelper.CreateWorkbook(path, ds) with a dataset containing null fields. Confirm that null cell values are handled as empty values rather than producing an "Invalid cell value" exception, then verify the generated workbook opens correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.