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

Free Support Forum - aspose.com

PivotTable Timeline Filter disappears after loading excel document and updating

I have a timeline filter in excel 2013 applying to pivot table.

When I load excel document into aspose.cells (7.5.3.0v) the filter disappears after I load new data and update pivot table.

Any ideas?

Hi,

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

Please download and try the latest version Aspose.Cells
for .NET v7.5.3.2
and see if it works fine.

If your problem still occurs, then please provide us your simple runnable sample code and source files replicating this issue with the latest version. We will look into it and update you asap.

Excel sample using v7.5.3.2 exhibiting issue.

Trying to add zip file but not upload??

Hi,

Thanks for your posting and using Aspose.Cells.

Please try to attach your sample file and also let us know you sample code which you are using to replicate this issue. It will be helpful for us to look into this issue.

Here is the sample Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aspose.Cells;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
//Instantiate the License class
Aspose.Cells.License license = new Aspose.Cells.License();

//Pass only the name of the license file embedded in the assembly
license.SetLicense("Aspose.Total.lic");

Workbook workbook = new Aspose.Cells.Workbook(@"../../OriginalPivotWithTimelineFilter.xlsx");

string file = @"../../AsposePivotWithTimelineFilter.xlsx";
workbook.Save(file, Aspose.Cells.SaveFormat.Auto);
}
}
}

Hi,

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

We are afraid, Pivot Table Timeline Filter is a New Feature and currently not supported by Aspose.Cells. We have logged a New Feature Request for this issue in our database. We will look into it and implement it if possible. Once, there is some fix or update for you, we will let you know asap.

This issue has been logged as CELLSNET-42037.

Hi, is this Feature now supported? I’m facing the same problem.

Also refresh pivot table data with aspose cells and not Excel, is still not supported?

Best regards

@bennetpe,

The logged ticket was suspended. Please try our latest version/fix: Aspose.Cells for Java 22.9 (Download | Maven). If you still find this is not supported after resaving the Excel file by Aspose.Cells for Java API, kindly zip and attach your template file and output file. Also, share your sample code (runnable) that you are using, we will check it soon.

The features like refreshing pivot data and calculating pivot data are supported by Aspose.Cells but the source data of the pivot table should be inside the same workbook. Aspose.Cells does not support to refresh data model for a pivot table or it does not support to refresh data whose data source is external.

Hi, thanks for the quick reply! :slight_smile:

As you mentioned, updating and calculating pivot data works fine with the new version.
But the timeline component still disappears, as you can see when you run the attached sample project. We need this feature as soon as possible, could you please provide a solution.

With kind regards
timeline_example.zip (100.5 KB)

@bennetpe,

Thanks for the template files.

Please notice, I am able to reproduce the issue as you mentioned with latest version of Aspose.Cells for Java API by using your template file and sample. I found PivotTable Timeline filter disappears after loading/importing new data and updating pivot table in the Excel file. I have logged a separate ticket with an id “CELLSJAVA-44900” for your issue. We will look into it soon.

Once we figure it out or have some other updates on it, we will let you know.

1 Like

@bennetpe,

Timeline uses date as data source. We think this is not a bug with Aspose.Cells for Java API. There are two tips for you that you may follow to figure it out:
1). The date format in the JSON data is separated by dots, so you need to set it to the correct Locale or use slashes to separate your date data of JSON.

Please change the following code:

wb = new Workbook(templatePath.toString() + "\"+ "sample_pivot.xlsx");

to:

wb = new Workbook(templatePath.toString() + "\"+ "sample_pivot.xlsx");
//match your date format of json data
wb.getSettings().setLocale(Locale.GERMANY);

2). When parsing JSON data, open the ConvertNumericOrDate option.

Please change the following lines of code:

// Set JsonLayoutOptions
options = new JsonLayoutOptions();
options.setTitleStyle(style);

to:

// Set JsonLayoutOptions
options = new JsonLayoutOptions();
options.setTitleStyle(style);

//add this line to set correct value
options.setConvertNumericOrDate(true);

After completing the above two changes, you can get the correct results. Can you try it and let us know if you still find any issue.

1 Like

Hello @Amjad_Sahi,

thank you very much for the hints!

With the locale setting and conversion options, the delivered result includes the timeline component.

With kind regards

@bennetpe,

You are welcome. Good to know that your issue is sorted out by the suggested code segments.