An unhandled exception of type 'ICSharpCode.SharpZipLib.Zip.ZipException' occurred in ICSharpCode.SharpZipLib.dll
Additional information: Wrong Local header signature: 0xE011CFD0
```
internal DataTable OpenXL(string fullpath)
{
DataTable table = new DataTable();
XSSFWorkbook workbook = new XSSFWorkbook(new FileStream(fullpath, FileMode.Open, FileAccess.Read)); //ERROR AT THIS STATEMENT
.......
}
```
Comments: ** Comment from web user: PavanGayakwad **
It is the valid XL sheet created in office 2013. Attached the demo file for your reference.
This morning I got another error:
"An unhandled exception of type 'System.InvalidOperationException' occurred in NPOI.OOXML.dll
Additional information: Cannot get a text value from a numeric cell"
Here is the code I am using:
```
DataTable table = new DataTable();
XSSFWorkbook workbook = new XSSFWorkbook(new FileStream(fullpath, FileMode.Open, FileAccess.Read));
ISheet sheet = workbook.GetSheetAt(0);
IRow headerRow = sheet.GetRow(0);
int cellCount = headerRow.LastCellNum;
for (int i = headerRow.FirstCellNum; i < cellCount; i++)
{
DataColumn column = new DataColumn(headerRow.GetCell(i).StringCellValue);
table.Columns.Add(column);
}
int rowCount = sheet.LastRowNum;
for (int i = (sheet.FirstRowNum); i < sheet.LastRowNum; i++)
{
IRow row = sheet.GetRow(i);
DataRow dataRow = table.NewRow();
for (int j = row.FirstCellNum; j < cellCount; j++)
{
if (row.GetCell(j) != null)
{
//EXCEPTION GENERATING IN THIS CODE
dataRow[j] = row.GetCell(j).ToString();
////////////////////////////
}
}
table.Rows.Add(dataRow);
}
workbook = null;
sheet = null;
return table;
```