Pivot table output to pdf issue[Urgent]

Hi,


Thanks for the template file.

Well, we cannot evaluate your issue properly based on your template file containing your markers. We appreciate if you could create a sample console application (runnable) with your template Excel file (containing smart markers, you may use some dynamic data table(s) to set it as data source for the markers for your data) using v7.5.0.x, zip it and post it here to reproduce the issue on our end. Also when you save to Excel file format, is it fine or not. Also give us some screen shots to highlight the problematic areas. All this will help to analyze your issue properly so we could fix it soon.

Thank you.

Hi Amjad,


Please see the attached screenshot with problematic Area. Few Cells are getting bold and few not.
Also Excel output is coming fine. Issue is with pdf output only.
Also as the issue was fixed earlier but broken with new aspose dll so i dont think i will be able to give sample application for the same.
Please review the attachments again and fix it.

Hi,


Thanks for the screen shot.

Please attach your MS Excel output here, it may help us to evaluate the issue accordingly.

Thank you.

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


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

Still this is not resolved.

I have again tried and found that even if I send the hard coded pivot
sheets.

When its getting combined using Aspose its having different fonts.


Dim myCombineExcel11 As New Aspose.Cells.Workbook("C:\Reports70\temp\test1.xlsx")

Dim myIndvidualExcelFile11 As New Aspose.Cells.Workbook("C:\Reports70\temp\test2.xlsx")

myCombineExcel11.Combine(myIndvidualExcelFile11)


If File.Exists("C:\Reports70\temp\test3.xlsx") Then File.Delete("C:\Reports70\temp\test3.xlsx")


If myCombineExcel11.Worksheets.Count > 0 Then

myCombineExcel11.Worksheets(0).IsSelected = True

For i As Int32 = 1 To myCombineExcel11.Worksheets.Count - 1

myCombineExcel11.Worksheets(i).IsSelected = False

Next

End If

myCombineExcel11.Save("C:\Reports70\temp\test3.xlsx")

in above code I am combining text1 and test2 and getting result as test3.

In test1 and test2 font size is coming 9 same like template but in test3 its coming 9 on the first tab and 11 on the second tab.

Hope this you can replicate. I am using 7.5.1.0

also make this post public now.

Hi,


Thanks for providing us the template files and sharing sample code.

After an initial test as I have tested your sample code with your template Excel files. I have found the issue regarding font size which has changed a bit after the merging process is done. The font size in the first worksheet is fine but in the second worksheet, it extends the font size a bit as the you mentioned. I have logged a ticket with an id “CELLSNET-41842” for your issue. We will look into your issue soon.

Once we have any update on it, we will let you know here.

Thank you.

Please make this post public now.

Hi,


Could you click on “Make Public” command button in the first post in the thread:
https://forum.aspose.com/t/92651

Thank you.

i cannot see any button to Make public.

see attached screenshot.
please make this public and give me access to make it public for future.

Hi,


Well, it looks like rights issue, you have not sufficient rights to do that.

Anyways, another way is to uncheckKeep this post private” checkbox (at bottom) when replying to this post if it works for your needs. Also, I cannot do this as you are the owner of your thread.

Thank you.

on reply also Keep this post private” is disabled for me.

Hi,


I have asked the concerned authorities to look into your issue. Hopefully, they will evaluate your issue and get back to you soon to make your thread public again.

Thank you.

Hi,


We have made your thread public now for your requirements.

Thank you.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed the issue.

Please download and try this fix: Aspose.Cells for .NET v7.5.1.2 and let us know your feedback.

Still the issue is partially solved.

If you review the page 2 of attached pdf then 4th row MISCELLANEOUS is not supposed to be Bold but coming bold in pdf. Which is fine in excel output.

Hi,


Thanks for the template files and the screen shot.

You are right, the issue is still there regarding bold font in the second worksheet of your attached template file when rendering to PDF file format. The original 4th row in the pivot table (in the second sheet of the template Excel file) is not bold where as it is rendered as bold in the output PDF (second page). I have reopened your issue “CELLSNET-41842” again. Our concerned developer will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.


Hi,

Thanks for using Aspose.Cells.

Please add this sample code before saving:

C#
for (int i = 0; i < book.Worksheets.Count; i++)
{
Worksheet sheet = book.Worksheets[i];
if (sheet.PivotTables != null && sheet.PivotTables.Count > 0)
{
for (int j = 0; j < sheet.PivotTables.Count; j++)
{
PivotTable table = sheet.PivotTables[j];
table.RefreshData();
table.CalculateData();
}


}


}

This all i have done and have in my code but still we are having this issue so please fix it from your side.


my code snapshot below

Dim pivot As Aspose.Cells.Pivot.PivotTable
Dim pchart As Aspose.Cells.Charts.Chart
''refreshing pivot tables and charts from all worksheets
For Each ws As Aspose.Cells.Worksheet In myWorkBook.Workbook.Worksheets
For Each pivot In ws.PivotTables
pivot.PreserveFormatting = True
pivot.RefreshData()
pivot.CalculateData()
Next

For Each pchart In ws.Charts
pchart.RefreshPivotData()
Next
Next

please reply me on this

Hi,


I used our latest version/fix. Please download and try our latest version/fix: Aspose.Cells for .NET v7.5.1.3.

It works fine and I don’t find the issue regarding bold font in the second worksheet of your attached template file when rendering to PDF file format.

Here is my code and please find attached the output PDF file, all the pivot tables are rendered fine.

Sample code:
[VB]


Dim wb As New Workbook(“e:\test2\PIVOT_78_0.xlsx”)

For i As Integer = 0 To wb.Worksheets.Count - 1
Dim sheet As Worksheet = wb.Worksheets(i)
If sheet.PivotTables IsNot Nothing AndAlso sheet.PivotTables.Count > 0 Then
For j As Integer = 0 To sheet.PivotTables.Count - 1
Dim table As PivotTable = sheet.PivotTables(j)
table.RefreshData()
table.CalculateData()
Next j


End If


Next i

wb.Save(“e:\test2\PIVOT_78_0.pdf”)

If you still find the issue, kindly highlight the problematic areas in my attached PDF file comparing with the original file’s sheet(s), we will check it soon.

Thank you.