Wiki Markup |
---|
{introducedin: 8.4} {description} {excerpt} Creates a new, blank PivotTable for the specified area. A PivotTable created by this method is part of {{[EW8:PivotTables]}} collection. {excerpt} {signature:C#} public PivotTable CreatePivotTable(Area data, int aRow, int aColumn) {signature} {signature:vb.net} Public Function CreatePivotTable(ByVal data As Area, ByVal aRow As Integer, ByVal aColumn As Integer) As PivotTable {signature} {parameters} {param:data} The data that is represented within the PivotTable. {param} {param:aRow} The 0-based number of the row of the upper left corner of the PivotTable. {param} {param:aColumn} The 0-based number of the column of the upper left corner of the PivotTable. {param} {example} {code:csharp|title=C#} 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} {code:vb.net|title=vb.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); {code} {example} |
Page History
Overview
Content Tools