We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

System.IndexOutOfRangeException: Index was outside the bounds of the array. on Workbook.Save

Using ASPOSE CELLS v5.3.2.2

I’m trying to save an Excel WorkBook as a PDF file, using the Save method :

Dim excelFile As Aspose.Cells.Workbook = Nothing
excelFile = New Workbook(inExcelFilePath)
excelFile.Save(outPdfFilePath, SaveFormat.Pdf)

During the Call of the Save method, the process in stopped with the Exception :
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Aspose.Cells.?.?(String ?)
at Aspose.Cells.?.?(Worksheet ?, Cell ?, FormatCondition ?, ? ?)
at Aspose.Cells.?.?(Worksheet ?, Cell ?)
at Aspose.Cells.?.?(Worksheet ?, Cell ?, Style ?, Boolean ?, Style& ?)
at Aspose.Cells.Pdf.?.?(Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?)
at Aspose.Cells.Pdf.?.?(Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?)
at Aspose.Cells.Pdf.?.?(XmlNode ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?, Int32 ?)
at Aspose.Cells.Pdf.?.?(XmlNode ?, ? ?)
at Aspose.Cells.Pdf.?.?(XmlNode ?, XmlNode& ?, ? ?)
at Aspose.Cells.Pdf.?.?(CellArea ?, Boolean ?, XmlNode ?)
at Aspose.Cells.Pdf.?.?(XmlNode ?, Int32 ?)
at Aspose.Cells.Pdf.?.?()
at Aspose.Cells.Pdf.?.?(Stream ?)
at Aspose.Cells.Workbook.Save(Stream stream, FileFormatType fileFormatType)
at Cnr.Inari.SVC.IO.Pdf.PDFHelperAspose.ExcelToPdf(String inExcelFilePath, String outPdfFilePath, Boolean calculateFormula) in E:\Temp\CRI_INA_INARI\Main\Sources\Main\Source\INARI-SVC\IO\PDFHelperAspose.vb:line 62
at Cnr.Inari.BLL.Entities.Message.EnvoyerVers(String exchangeWSUrl, String exchangeMailBox, String exchangeUser, String exchangePassword, String exchangeDomaine, Boolean isOwner, String to, String attachment, String body) in E:\Temp\CRI_INA_INARI\Main\Sources\Main\Source\INARI-BLL\Entities\Message.vb:line 284
at Cnr.Inari.BLL.Entities.Mail.Envoyer(String exchangeWSUrl, String exchangeMailBox, String exchangeUser, String exchangePassword, String exchangeDomaine, Boolean isOwner, String attachment, String bodyUrl, String adressPattern) in E:\Temp\CRI_INA_INARI\Main\Sources\Main\Source\INARI-BLL\Entities\Mail.vb:line 66
at Cnr.Inari.AlertesUC.AcquitterMessages(Boolean envoi) in E:\Temp\CRI_INA_INARI\Main\Sources\Main\Source\INARI\Composants\AlertesUC.ascx.vb:line 350

What is very strange is that this application is installed on 2 IIS web server who are redundant with a load balancer.
The configuration are exactly the same
On the first server, the save method works fine…
On the second one, the save method failed with the error given above
The Application pool identity are defined as “Network Service” on both site.

We remarqued that if we put the pool identity as “Local System” on the server where we got the error, then, it works fine !

Any idea about what can be wrong ?

thanks

Hi,


Well, I am not sure why you got this issue on the second server whereas it works fine on first server.

By the way, we recommend you to use our latest version/fix where we enhanced our product features(including rendering to PDF) in it. Please get the latest version: Aspose.Cells for .NET v7.0.3.2 and let us know your feedback.

Thank you.




Thanks for your answer

Unfortunately, we tried it, and the issue is the same…


Hi,


Could you create a sample application, zip it and post it here. Also provide all the details to reproduce the issue. We need to reproduce the issue on our end.

Thank you.

My answer above is wrong, we were on v7.0.0.0

we tried v7.0.3.2 and it works…

thanks !