[]
Gets or sets whether layout updates for the PivotTable are deferred.
When this property is true, layout changes can be accumulated and then applied by calling Update().
bool DeferLayoutUpdate { get; set; }
Property DeferLayoutUpdate As Boolean
worksheet.Range["A1:C5"].Value = new object[,] {
{"Category", "Product", "Amount"},
{"Beverages", "Tea", 100},
{"Beverages", "Coffee", 200},
{"Snacks", "Biscuits", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C5"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "PivotTable1");
pivotTable.DeferLayoutUpdate = true;
bool deferred = pivotTable.DeferLayoutUpdate;