Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Introducedin
8.4
8.4
Description

Excerpt

Creates a new, blank

pivot table

PivotTable for the specified area.


Excerpt

A PivotTable created by this method is part of PivotTables collection.

Signature
C#
C#
public PivotTable CreatePivotTable(Area data, int aRow, int aColumn)

...

Param
data
data

The data that is represented within the pivot tablePivotTable.

Param
aRow
aRow

The 0-based number of the row of the upper left corner of the pivot tablePivotTable.

Param
aColumn
aColumn

The 0-based number of the column of the upper left corner of the pivot tablePivotTable.

Example
Code Block
csharp
csharp
titleC#
ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Open(@"C:\MySpreadsheet.xlsx");
          Worksheet ws = wb.Worksheets[0];
          Area data = ws.CreateArea(0, 0, 10, 10);
          PivotTable pt = ws.PivotTables.CreatePivotTable(data, 11, 11);
Code Block
vb.net
vb.net
titlevb.net
Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Open("C:\MySpreadsheet.xlsx")
          Dim ws As Worksheet = wb.Worksheets(0)
          Dim data As Area = ws.CreateArea(0, 0, 10, 10)
          Dim pt As PivotTable = ws.PivotTables.CreatePivotTable(data, 11, 11);