We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Pivot Issue - Formatting & Filter Issue

I am using Aspose.Cells version 7.1.1.0 and am having a few problems with the pivot and another problem with a textbox. I have attached the template I am using, the file output, and the code is below.

Here are the problems:
1. After I run this and refresh the pivot the formatting is off (first line is highlighted grey).

2. The headers are also not showing up in the pivot.
3. The filter drop downs in the pivot do not show “Zone 2” or “Region 2” as they should.
4. When I am update the Textbox with the date, is displaying as “DaAe:”.

If you refresh the pivot then problems 1-3 are fixed. Any suggestions?

workbook = New Workbook(System.IO.Directory.GetCurrentDirectory() + “” & TemplateName)
workbook.FileFormat() = Aspose.Cells.FileFormatType.Xlsm

Dim worksheet As Worksheet = workbook.Worksheets(“Pricing Report”)
Dim TextBox As Aspose.Cells.Drawing.TextBox = worksheet.TextBoxes(0)
TextBox.Font.Size = 12
TextBox.Font.IsBold = True
Dim sDate As String = DateTime.Now.ToString(“Date: MM/dd/yyyy”).ToString()
TextBox.Text = sDate

Dim range As Range = workbook.Worksheets(“Data”).Cells.CreateRange(0, 0, 8, 27)
range.Name = "DataSource"

Dim pivotable As Pivot.PivotTable
pivotable = workbook.Worksheets(“Pricing Report”).PivotTables(“PvtPricing”)
pivotable.RefreshData()
pivotable.CalculateData()

workbook.Save(System.IO.Directory.GetCurrentDirectory() + “” + SaveName, Aspose.Cells.SaveFormat.Xlsm)

Hi,


Thanks for the files and sample code.

I can notice the issue as you have mentioned after running your code with the template file, i.e. “TMP±+Pricing+Report.xlsm”. The output file has issues as you pointed out.

I have logged a ticket with an id: CELLSNET-40382. We will soon look into it.

Thank you.

Hi,

We have fixed this issue. Please download:
Aspose.Cells
for .NET v7.1.1.2


For this issue:

4. When I am update the Textbox with the date, is displaying as “DaAe:”.

Please change your sample code:


String sDate = "Date: " + DateTime.Now.ToString(“MM/dd/yyyy”).ToString();


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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.