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

Closed Unassigned: Error while opening excel file stream [13416]

$
0
0
I happened a bad question, while publish production server, application read excel stream will throw exception "Wrong Local header signature", but test server no problem, attachment my code:



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

Viewing all articles
Browse latest Browse all 1621

Trending Articles



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