Message-ID: <66915522.9195.1711679369453.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9194_981813010.1711679369453" ------=_Part_9194_981813010.1711679369453 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html PivotTables.CreateConsolidatedPivotTable(IEnumerable, Int32, Int= 32)

PivotTables.CreateConsolidatedPivotTable(IEnumerable, Int32, Int32)=

Introduced in = build 8.6.1

=20

Description

=20

Creates a new PivotTable for multiple consolidated ranges. A PivotTable = created by this method is part of PivotTables collection.

=20
C#
=20
public PivotTable CreateConsolidatedPivotTable(IEnumerable<Area> data=
, int row, int column)
=20
=20
vb.net
=20
Public Function CreateConsolidatedPivotTable(ByVal data As IEnumerable (of =
Area), ByVal row As Integer, ByVal column As Integer) As PivotTable
=20
=20

Parameters

=20
data
The data that is represented within the PivotTable.=20
aRow
The 0-based number of the row of the upper left corner of = the PivotTable.=20
aColumn
The 0-based number of the column of the upper left c= orner of the PivotTable.=20

Remarks

This constructor will create Row, Column, and Value&= nbsp;as ? SourceFields. &nb= sp;These ? SourceFields will be created using the same algorithm that the= Pivot Table Wizard in Excel uses to create Multiple Consolidation Pivot Ta= bles.=20

Examples

=20
C#
=20
ExcelApplication xla =3D new ExcelApplication();
Workbook wb =3D xla.Open(@"C:\MySpreadsheet.xlsx");
Worksheet ws =3D wb.Worksheets[0];
List<Area> areas =3D new List<Area>();
Area data =3D ws.CreateArea(0, 0, 10, 10);
Area data2 =3D ws.CreateArea(12, 0, 5, 5);
areas.Add(data);
areas.Add(data2);
PivotTable pt =3D ws.PivotTables.CreateConsolidatedPivotTable(areas, 11, 11=
);
=20
=20
vb.net
=20
Dim xla As New ExcelApplication()
Dim wb As Workbook =3D xla.Open("C:\MySpreadsheet.xlsx")
Dim ws As Worksheet =3D wb.Worksheets(0)
Dim areas As New List(of Area)
Dim data As Area =3D ws.CreateArea(0, 0, 10, 10)Dim data2 As Area =3D ws.Cr=
eateArea(0, 12, 5, 5)areas.Add(data);areas.Add(datas);Dim pt As PivotTable =
=3D ws.PivotTables.CreatePivotTable(areas, 11, 11);
=20
------=_Part_9194_981813010.1711679369453--