See the following sample code and demo file, it will throw error as following, please help check it, thanks.
Error:
System.ArgumentOutOfRangeException: length ('-1') must be a non-negative value. (Parameter 'length')
Actual value was -1.
at Aspose.Cells.Workbook.Save(Stream stream, SaveOptions saveOptions)
sample code:
using (Workbook document = new Workbook("xxxxx\\test3-4-1-1-2-1-1-1-1-1.xlsx"))
{
// 输出
using (var ms = new MemoryStream())
{
string contentType = "text/html";
document.Save(ms, Aspose.Cells.SaveFormat.Html);
document.Dispose();
return File(ms.ToArray(), contentType);
}
}
@davidxiao2008
By using sample file and code for testing, we can reproduce the issue. Discovered that ArgumentOutOfRangeException occurred when saving the file to HTML.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-54925
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
This is an issue with Aspose.Cells, we have fixed it now. The fix will be included in an upcoming release (Aspose.Cells v24.1) that we plan to release in the first half of January2024. You will be notified when the next version is released.
The issues you have found earlier (filed as CELLSNET-54925) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi