Hi,
We have an application running in production using Aspose.cells to generate plain text data report. It has been working well for a few months. Recently our server encounted quite a number of Null reference exceptions intermittently . The exception trace all point to the same part of Aspose code, as show below:
at Aspose.Cells.x220f433da4115056.x7d0214bf69711dd9(Stream xcf18e5243f8d5fd3)
at Aspose.Cells.x220f433da4115056.x7d0214bf69711dd9(String x1c1fc72fe1a3b4ea, Assembly x5807f920b6fc67c4)
at *****************************.InitBlankWorkbook(String sheetName)
at *****************************************************
Below is our code to initialize the workbook:
private Workbook InitBlankWorkbook(string sheetName)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
{
License license = new License();
license.SetLicense("Aspose.Cells.lic");
Workbook workbook = new Workbook();
int sheetCount = workbook.Worksheets.Count;
for (int i = sheetCount; i > 0; i--)
{
workbook.Worksheets.RemoveAt(i - 1);
}
workbook.Worksheets.Add(SheetType.Worksheet);
workbook.Worksheets[0].Name = sheetName;
return workbook;
}
The code runs on a Windows 64-bit server. The Aspose dll version is: 4.7.0.0
Please help to investigate. Thank you!