Posted 30 July 2019, 3:45 pm EST
Hi .
i have excel file where i am trying to save it as PDF , but during the process i am getting below error
java.lang.StackOverflowError: null
at java.lang.String.equals(Unknown Source)
at com.grapecity.documents.excel.drawing.y.a(Unknown Source)
this is My Code :
Workbook finalOut = null;
String tempFile ="E:\\ExcelFile.xlsx";
String outFile ="excelPdf.pdf";
try {
finalOut = getWorkbook(new FileInputStream((tempFile)));
if (finalOut != null) {
finalOut.save(new FileOutputStream(outFile), SaveFileFormat.Pdf);
}
} catch (Exception e) {
System.err.println("Error => {} "+ e.toString());
}
FYI :
Excel file has conditional formats , cell styles …
My Notice when more than 1 conditional format this issue is coming …
i am also attaching the excel file for your reference .
Please fix this ASAP