Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

Commented Unassigned: Error while opening XL file [13106]

$
0
0
__Error while opening XL file__

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: hjjjizhan **

Hi, I happened same question with you, How do you solve ? But the error not happened all server, Attachment my code:

using (MemoryStream ms = new MemoryStream(downloadFile, 0, downloadFile.Length))
{
if (task.FileType == 2) //Office 2007
workbook = new XSSFWorkbook(ms); // Exception Code
else if (task.FileType == 1) //Office 2003
workbook = new HSSFWorkbook(ms); // Exception Code
}

Thx


Viewing all articles
Browse latest Browse all 1621

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>