Truncated pivot table when converting to PDF

Hi,

Two bugs/issues:
1. I have this worksheet with one pivot table, when I save this pivot table as PDF, the resulting PDF file has only 5 out of 26 rows and no total footer, basically it gets truncated.
2. Also, in the pagefields collection, the dates are exported sometimes as currency values and sometimes as numeric values, there is a “NumberFormat” but not a “DateFormat”, I need to keep the original date format MMMM yy.

Please check the attached .net project so you can duplicate the issue, follow this steps:

1. Run the project and select the provided TestFile.xlsx.
2. Open the file at the specified location, and compare the excel file against the PDF file.
3. PDF file is truncated and date formats are all wrong.

Using:
id=Aspose.Cells version=7.7.1
id=Aspose.Pdf version=8.8.1
Please advice, is this a bug? is this something I am doing wrong? is there a workaround?
Thanks!

Hi Joshua,

Thanks for your posting and using Aspose.Cells.

Please clear the print area of your worksheet which is set to A1:I15 before creating your pdf. We have cleared the print area and now the generated pdf has a complete pivot table.

We have tested it with the latest version: Aspose.Cells
for .NET v7.7.1.4


You can clear the print area using the following code. I have also attached the output pdf for your reference.

wb.Worksheets(“Settlement By Producer”).PageSetup.PrintArea = “”

However, the issue of date format inside the pivot table does exist in the output pdf file. We have logged this issue in our database for a fix. Once, this issue is fixed or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42336.

I have also attached the screenshot highlighting this issue for a reference.

VB.NET


Dim ofd_FileName As String = “F:\Shak-Data-RW\Downloads\col\TesFile.xlsx”


Dim wb = New Workbook(ofd_FileName)

wb.Worksheets(“Settlement By Producer”).PageSetup.PrintArea = “”

wb.Worksheets(“Settlement By Producer”).PivotTables(0).PreserveFormatting = True


wb.Worksheets(“Meter Detail”).VisibilityType = VisibilityType.VeryHidden 'we just want to create pivote table for first sheet.


Dim pdfDestination = Path.ChangeExtension(ofd_FileName, “2.pdf”)

wb.Save(pdfDestination, Aspose.Cells.SaveFormat.Pdf)

The issues you have found earlier (filed as CELLSNET-42336) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.