I’ve attached a Visual Studio 2010 C# solution targeted at .NET 4.0 that reproduces the bug in both v7.3.0.0 and v7.3.0.5, but here’s a quick snippet:
var wb = new Workbook(“PivotTable.xlsx”);
var pivotTable = wb.Worksheets[0].PivotTables[“PivotTable1”];
//=Sheet2!$A$1:$B$11
Console.WriteLine(“current datasource: {0}”, pivotTable.DataSource[0]);
Console.WriteLine(“attempting to change datasource from Sheet2 to Sheet3…”);
pivotTable.ChangeDataSource(new[] { “=Sheet3!$A$1:$B$11” });
//should now be Sheet3 but it’s Sheet1
Console.WriteLine(“current datasource: {0}”, pivotTable.DataSource[0]);
The problem exists in the latest version (v7.3.0.0) and v7.3.0.5 obtained from here:
<a href="https://forum.aspose.com/t/107037
Please let me know if you need any more info. Thank you in advance!