- Home
- Forum
- ASP.NET MVC - EJ 2
- Conversion excel to PDF giving exception Index out of bounds.
Conversion excel to PDF giving exception Index out of bounds.
Hello,
Attachment: result_3c19812a.zip
during the conversion of a excel file to pdf, it was throw the exception "The index was out of bounds [...] [ Name of parameter: Index ]".
The excel is a model that uses tags to fill through code, then we convert the result to pdf. Attached I will the result that should be converted to pdf.
The excel is a model that uses tags to fill through code, then we convert the result to pdf. Attached I will the result that should be converted to pdf.
Attachment: result_3c19812a.zip
SIGN IN To post a reply.
3 Replies
KK
Konduru Keerthi Konduru Ravichandra Raju
Syncfusion Team
January 22, 2020 12:51 PM UTC
Hi Cláudio,
Greetings from Syncfusion.
We are able to reproduce the reported issue and validating it currently. We will share the validation details on 24th January 2020.
Regards,
Keerthi.
AV
Abirami Varadharajan
Syncfusion Team
January 27, 2020 01:35 AM UTC
Hi Claudio,
Thank you for your patience.
We confirmed the issue with “Exception throws while ExcelToPDF conversion on creating PivotTable only with Row Fields” is a defect and logged a defect report for the same. The patch for this issue is estimated to be available on 7th February 2020. You can track the status of defect report through following feedback link.
Regards,
Abirami
KK
Konduru Keerthi Konduru Ravichandra Raju
Syncfusion Team
February 7, 2020 12:02 PM UTC
Hi Cláudio,
Thanks for your patience.
We have fixed the issue Exception throws while ExcelToPDF conversion on creating PivotTable only with Row Fields and generated patch in the version v17.4.0.39.
We suggest you to use the patch with following code snippet.
Code Snippet:
|
//Instantiate ExcelEngine
using (ExcelEngine excelEngine = new ExcelEngine())
{
//Initialize IApplication
IApplication application = excelEngine.Excel;
//Set the default application version
application.DefaultVersion = ExcelVersion.Excel2013;
//Load the existing Excel docuemnt into IWorkbook
IWorkbook workbook = application.Workbooks.Open(Server.MapPath("App_Data/result.xlsx"), ExcelOpenType.Automatic);
//Initialize ExcelToPdfConverter
ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
//Initialize ExcelToPdfConverterSettings and disable the gridlines
ExcelToPdfConverterSettings converterSettings = new ExcelToPdfConverterSettings();
converterSettings.DisplayGridLines = GridLinesDisplayStyle.Invisible;
//Initialize PDF document
PdfDocument pdfDocument = new PdfDocument();
//Convert Excel document into PDF document
pdfDocument = converter.Convert(converterSettings);
//Open the document in browser after saving it
pdfDocument.Save("Output.pdf", HttpContext.ApplicationInstance.Response, HttpReadType.Save);
} |
The patch with fix to resolve the reported issue can be downloaded from the following link.
Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:
Assembly Version: 17.4.0.39
Installation Directions :
This patch should replace the files “Syncfusion.XlsIO.Base.dll” under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.6
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\17.4.0.39\precompiledassemblies\17.4.0.39\4.6
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.
Note :
You can change how you receive bug fixes by navigating to the following link and updating your preferences.
Disclaimer :
Please note that we have created this patch for version 17.4.0.39 specifically to resolve the issues reported in forum 150841.
If you have received other patches for the same version for other products, please apply all patches in the order received.
This fix will be included in our release version 18.1 which will be rolled out by end of March 2020.
Regards,
Keerthi.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
CW Cláudio Walter
- Jan 21, 2020 06:10 PM UTC
- Feb 7, 2020 12:02 PM UTC