[]
Returns a single object from a collection.
IPivotTable this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As IPivotTable
| Type | Name | Description |
|---|---|---|
| int | index | The index number for the object. |
| Type | Description |
|---|---|
| IPivotTable | The IPivotTable at the specified index. |
worksheet.Range["A1:B4"].Value = new object[,] {
{"Name", "Value"},
{"A", 100},
{"B", 200},
{"A", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
IPivotTable pivotTable = worksheet.PivotTables[0];
Returns a single object from a collection.
IPivotTable this[string name] { get; }
ReadOnly Default Property Item(name As String) As IPivotTable
| Type | Name | Description |
|---|---|---|
| string | name | The name for the object. |
| Type | Description |
|---|---|
| IPivotTable | The IPivotTable with the specified name. |
worksheet.Range["A1:B4"].Value = new object[,] {
{"Name", "Value"},
{"A", 100},
{"B", 200},
{"A", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
IPivotTable pivotTable = worksheet.PivotTables["SalesPivot"];