We are also a commercial customer using Spire.XLS and we are experiencing the same problem with .xsls files (see attachment as an example)
IE-20191016.zip
Your assistance in getting this problem resolved would be much appreciated.
Code:
using (var memoryStream = new MemoryStream())
{
await myStream.CopyToAsync(memoryStream);
// Get Excel workbook ready
Workbook workbook = new Workbook();
workbook.LoadFromStream(memoryStream);
MemoryStream result = new MemoryStream();
// Iterate through all worksheets:
foreach (Worksheet s in workbook.Worksheets)
{
// Populate stream
s.SaveToStream(result, ";");
// Append text content from each worksheet to string
myText += Encoding.ASCII.GetString(result.ToArray());
}
return myText;
}
Stack trace:
Zip exception.Can't locate end of central directory record. Possible wrong file format or archive is corrupt. at sprᜌ.ᜁ(Stream A_0, Boolean A_1) at spr។..ctor(XlsWorkbook A_0, Stream A_1, String A_2) at Spire.Xls.Core.Spreadsheet.XlsWorkbook.ᜀ(Stream A_0, String A_1) at Spire.Xls.Core.Spreadsheet.XlsWorkbook.ᜀ(Stream A_0, String A_1, ExcelVersion A_2, ExcelParseOptions A_3) at Spire.Xls.Core.Spreadsheet.XlsWorkbook..ctor(sprឌ A_0, Object A_1, Stream A_2, ExcelParseOptions A_3, ExcelVersion A_4) at sprឹ.ᜁ(Object A_0, Stream A_1, ExcelVersion A_2, ExcelParseOptions A_3) at spr.ᜀ(Object A_0, Stream A_1, ExcelVersion A_2, ExcelParseOptions A_3) at sprᢅ.ᜀ(Stream A_0, ExcelVersion A_1, ExcelParseOptions A_2) at sprᢅ.ᜀ(Stream A_0, ExcelVersion A_1) at sprᢅ.ᜀ(Stream A_0) at Spire.Xls.Workbook.LoadFromStream(Stream stream)
The 'ᜏ' character, hexadecimal value 0x170F, cannot be included in a name.
Login to view the files attached to this post.