I can’t convert the attached xlsx file to PDF. The process just uses all available memory on the computer and the conversion never ends.
Thanks for the sample file.
I can notice the issue regarding memory usage while converting the template file to PDF.
I have logged a ticket with an id: CELLSNET-40317. We will look into it to figure it out soon.
thanks for the information. I also got nearly 150 thousand pages to
print. But even if I delete all columns with dirty data from J on, it
has lowered the number of pages in print preview only to 83 thousand. So there still remains the problem with table style.
Please download and try this fix: Aspose.Cells for .NET (Latest Version)
If you want to change the pages to print in Ms Excel, please set the print area of
See the following sample code.
Workbook currentWorkbook = new Workbook(@“D:\fileTemp\Templates.xlsx”);
Worksheet sheet = currentWorkbook.Worksheets;
int maxRow = sheet.Cells.MaxDataRow;
int maxColumn = sheet.Cells.MaxDataColumn;
sheet.PageSetup.PrintArea = “A1:” + CellsHelper.CellIndexToName(maxRow, maxColumn);
I tested this fix and it works. Thank you.
But I noticed a little bug. Those red and yellow lines in the Excel file keep their color in PDF only if they are on white (table style) lines. If they are on pink lines they become pink in PDF.
here are the excel input file nad PDF output file. If you open them on the first page it’s clearly visible that the excel file has a few more yellow lines than the PDF file. Some of them changed to pink when converting to PDF. Similar with the red lines.
now it works great.
Thank you, Dejan