Hi,
Thanks for your reply!
We don't need to do range copy because A and B have the same data. What we want is to create a pivot table in B same as the pivot table in A.
I have referred to the pivot creating code and the underlined part is the information we are looking for from pivot table in A:
//Adding a PivotTable to the worksheet
int index = pivotTables.Add("=Data!A1:F30", "B3", "PivotTable1");
//Accessing the instance of the newly added PivotTable
Aspose.Cells.Pivot.PivotTable pivotTable = pivotTables[index];
//Showing the grand totals
pivotTable.RowGrand = true;
pivotTable.ColumnGrand = true;
//Setting the PivotTable report is automatically formatted
pivotTable.IsAutoFormat = true;
//Setting the PivotTable autoformat type.
pivotTable.AutoFormatType = Aspose.Cells.Pivot.PivotTableAutoFormatType.Report6;
//Draging the first field to the row area.
pivotTable.AddFieldToArea(Aspose.Cells.Pivot.PivotFieldType.Row, 0);
//Draging the fourth field to the column area.
pivotTable.AddFieldToArea(Aspose.Cells.Pivot.PivotFieldType.Column, 3);
//Draging the fifth field to the data area.
pivotTable.AddFieldToArea(Aspose.Cells.Pivot.PivotFieldType.Data, 5);
//Setting the number format of the first data field
pivotTable.DataFields[0].NumberFormat = "$#,##0.00";
Especially, whcih property/field/method in pivotable reflect the "=Data!A1:F30" and "B3" and "PivotTable1"?