コード例 #1
0
        // Generates content of tableDefinitionPart1.
        private void GenerateTableDefinitionPart1Content(TableDefinitionPart tableDefinitionPart1)
        {
            Table table1 = new Table(){ Id = (UInt32Value)2U, Name = "Table2", DisplayName = "Table2", Reference = "E1:G4", TotalsRowShown = false };
            AutoFilter autoFilter1 = new AutoFilter(){ Reference = "E1:G4" };

            TableColumns tableColumns1 = new TableColumns(){ Count = (UInt32Value)3U };
            TableColumn tableColumn1 = new TableColumn(){ Id = (UInt32Value)1U, Name = "Column1" };
            TableColumn tableColumn2 = new TableColumn(){ Id = (UInt32Value)2U, Name = "Column2" };
            TableColumn tableColumn3 = new TableColumn(){ Id = (UInt32Value)3U, Name = "Column3" };

            tableColumns1.Append(tableColumn1);
            tableColumns1.Append(tableColumn2);
            tableColumns1.Append(tableColumn3);
            TableStyleInfo tableStyleInfo1 = new TableStyleInfo(){ Name = "TableStyleMedium2", ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };

            table1.Append(autoFilter1);
            table1.Append(tableColumns1);
            table1.Append(tableStyleInfo1);

            tableDefinitionPart1.Table = table1;
        }
コード例 #2
0
        // Generates content of tableDefinitionPart2.
        private void GenerateTableDefinitionPart2Content(TableDefinitionPart tableDefinitionPart2)
        {
            Table table2 = new Table(){ Id = (UInt32Value)1U, Name = "Table1", DisplayName = "Table1", Reference = "A1:C4", TotalsRowShown = false };
            AutoFilter autoFilter2 = new AutoFilter(){ Reference = "A1:C4" };

            TableColumns tableColumns2 = new TableColumns(){ Count = (UInt32Value)3U };
            TableColumn tableColumn4 = new TableColumn(){ Id = (UInt32Value)1U, Name = "Column1" };
            TableColumn tableColumn5 = new TableColumn(){ Id = (UInt32Value)2U, Name = "Column2" };
            TableColumn tableColumn6 = new TableColumn(){ Id = (UInt32Value)3U, Name = "Column3" };

            tableColumns2.Append(tableColumn4);
            tableColumns2.Append(tableColumn5);
            tableColumns2.Append(tableColumn6);
            TableStyleInfo tableStyleInfo2 = new TableStyleInfo(){ Name = "TableStyleMedium2", ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };

            table2.Append(autoFilter2);
            table2.Append(tableColumns2);
            table2.Append(tableStyleInfo2);

            tableDefinitionPart2.Table = table2;
        }
コード例 #3
0
        // Generates content of tableDefinitionPart5.
        private void GenerateTableDefinitionPart5Content(TableDefinitionPart tableDefinitionPart5)
        {
            Table table5 = new Table(){ Id = (UInt32Value)2U, Name = "ProductTable1", DisplayName = "ProductTable1", Reference = "H1:I11", TotalsRowShown = false, HeaderRowFormatId = (UInt32Value)11U };
            AutoFilter autoFilter5 = new AutoFilter(){ Reference = "H1:I11" };

            TableColumns tableColumns5 = new TableColumns(){ Count = (UInt32Value)2U };
            TableColumn tableColumn11 = new TableColumn(){ Id = (UInt32Value)1U, Name = "ProductName" };
            TableColumn tableColumn12 = new TableColumn(){ Id = (UInt32Value)2U, Name = "Price", DataFormatId = (UInt32Value)10U };

            tableColumns5.Append(tableColumn11);
            tableColumns5.Append(tableColumn12);
            TableStyleInfo tableStyleInfo5 = new TableStyleInfo(){ Name = "TableStyleMedium2", ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };

            table5.Append(autoFilter5);
            table5.Append(tableColumns5);
            table5.Append(tableStyleInfo5);

            tableDefinitionPart5.Table = table5;
        }
コード例 #4
0
        // Generates content of tableDefinitionPart6.
        private void GenerateTableDefinitionPart6Content(TableDefinitionPart tableDefinitionPart6)
        {
            Table table6 = new Table(){ Id = (UInt32Value)1U, Name = "DataTable1", DisplayName = "DataTable1", Reference = "A1:F5", TotalsRowShown = false };
            AutoFilter autoFilter6 = new AutoFilter(){ Reference = "A1:F5" };

            SortState sortState2 = new SortState(){ Reference = "A2:F2001" };
            SortCondition sortCondition2 = new SortCondition(){ Reference = "A2:A2001" };

            sortState2.Append(sortCondition2);

            TableColumns tableColumns6 = new TableColumns(){ Count = (UInt32Value)6U };
            TableColumn tableColumn13 = new TableColumn(){ Id = (UInt32Value)1U, Name = "Date", DataFormatId = (UInt32Value)13U };
            TableColumn tableColumn14 = new TableColumn(){ Id = (UInt32Value)2U, Name = "Product" };
            TableColumn tableColumn15 = new TableColumn(){ Id = (UInt32Value)3U, Name = "Quantity" };
            TableColumn tableColumn16 = new TableColumn(){ Id = (UInt32Value)4U, Name = "Price" };
            TableColumn tableColumn17 = new TableColumn(){ Id = (UInt32Value)5U, Name = "DeliveryDate", DataFormatId = (UInt32Value)12U };
            TableColumn tableColumn18 = new TableColumn(){ Id = (UInt32Value)6U, Name = "Employee" };

            tableColumns6.Append(tableColumn13);
            tableColumns6.Append(tableColumn14);
            tableColumns6.Append(tableColumn15);
            tableColumns6.Append(tableColumn16);
            tableColumns6.Append(tableColumn17);
            tableColumns6.Append(tableColumn18);
            TableStyleInfo tableStyleInfo6 = new TableStyleInfo(){ Name = "TableStyleMedium2", ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };

            table6.Append(autoFilter6);
            table6.Append(sortState2);
            table6.Append(tableColumns6);
            table6.Append(tableStyleInfo6);

            tableDefinitionPart6.Table = table6;
        }
コード例 #5
0
        // Generates content of tableDefinitionPart4.
        private void GenerateTableDefinitionPart4Content(TableDefinitionPart tableDefinitionPart4)
        {
            Table table4 = new Table(){ Id = (UInt32Value)3U, Name = "SalesTable1", DisplayName = "SalesTable1", Reference = "K1:K11", TotalsRowShown = false, HeaderRowFormatId = (UInt32Value)9U };
            AutoFilter autoFilter4 = new AutoFilter(){ Reference = "K1:K11" };

            TableColumns tableColumns4 = new TableColumns(){ Count = (UInt32Value)1U };
            TableColumn tableColumn10 = new TableColumn(){ Id = (UInt32Value)1U, Name = "Employee" };

            tableColumns4.Append(tableColumn10);
            TableStyleInfo tableStyleInfo4 = new TableStyleInfo(){ Name = "TableStyleMedium2", ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };

            table4.Append(autoFilter4);
            table4.Append(tableColumns4);
            table4.Append(tableStyleInfo4);

            tableDefinitionPart4.Table = table4;
        }
コード例 #6
0
        // Generates content of tableDefinitionPart3.
        private void GenerateTableDefinitionPart3Content(TableDefinitionPart tableDefinitionPart3)
        {
            Table table3 = new Table(){ Id = (UInt32Value)4U, Name = "DataTable2", DisplayName = "DataTable2", Reference = "A1:F6", TotalsRowShown = false };
            AutoFilter autoFilter3 = new AutoFilter(){ Reference = "A1:F6" };

            SortState sortState1 = new SortState(){ Reference = "A2:F2001" };
            SortCondition sortCondition1 = new SortCondition(){ Reference = "A2" };

            sortState1.Append(sortCondition1);

            TableColumns tableColumns3 = new TableColumns(){ Count = (UInt32Value)6U };
            TableColumn tableColumn4 = new TableColumn(){ Id = (UInt32Value)1U, Name = "Date", DataFormatId = (UInt32Value)8U };
            TableColumn tableColumn5 = new TableColumn(){ Id = (UInt32Value)2U, Name = "Product", DataFormatId = (UInt32Value)7U };
            TableColumn tableColumn6 = new TableColumn(){ Id = (UInt32Value)3U, Name = "Quantity", DataFormatId = (UInt32Value)6U };
            TableColumn tableColumn7 = new TableColumn(){ Id = (UInt32Value)4U, Name = "Price", DataFormatId = (UInt32Value)5U };
            TableColumn tableColumn8 = new TableColumn(){ Id = (UInt32Value)5U, Name = "DeliveryDate", DataFormatId = (UInt32Value)4U };
            TableColumn tableColumn9 = new TableColumn(){ Id = (UInt32Value)6U, Name = "Employee", DataFormatId = (UInt32Value)3U };

            tableColumns3.Append(tableColumn4);
            tableColumns3.Append(tableColumn5);
            tableColumns3.Append(tableColumn6);
            tableColumns3.Append(tableColumn7);
            tableColumns3.Append(tableColumn8);
            tableColumns3.Append(tableColumn9);
            TableStyleInfo tableStyleInfo3 = new TableStyleInfo(){ Name = "TableStyleMedium2", ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };

            table3.Append(autoFilter3);
            table3.Append(sortState1);
            table3.Append(tableColumns3);
            table3.Append(tableStyleInfo3);

            tableDefinitionPart3.Table = table3;
        }
コード例 #7
0
        // Generates content of tableDefinitionPart2.
        private void GenerateTableDefinitionPart2Content(TableDefinitionPart tableDefinitionPart2)
        {
            Table table2 = new Table(){ Id = (UInt32Value)5U, Name = "ProductTable2", DisplayName = "ProductTable2", Reference = "H1:I11", TotalsRowShown = false, HeaderRowFormatId = (UInt32Value)2U };
            AutoFilter autoFilter2 = new AutoFilter(){ Reference = "H1:I11" };

            TableColumns tableColumns2 = new TableColumns(){ Count = (UInt32Value)2U };
            TableColumn tableColumn2 = new TableColumn(){ Id = (UInt32Value)1U, Name = "ProductName" };
            TableColumn tableColumn3 = new TableColumn(){ Id = (UInt32Value)2U, Name = "Price", DataFormatId = (UInt32Value)1U };

            tableColumns2.Append(tableColumn2);
            tableColumns2.Append(tableColumn3);
            TableStyleInfo tableStyleInfo2 = new TableStyleInfo(){ Name = "TableStyleMedium2", ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };

            table2.Append(autoFilter2);
            table2.Append(tableColumns2);
            table2.Append(tableStyleInfo2);

            tableDefinitionPart2.Table = table2;
        }
コード例 #8
0
        // Generates content of pivotTablePart9.
        private void GeneratePivotTablePart9Content(PivotTablePart pivotTablePart9)
        {
            PivotTableDefinition pivotTableDefinition17 = new PivotTableDefinition(){ Name = "PivotTable1", CacheId = (UInt32Value)1U, ApplyNumberFormats = false, ApplyBorderFormats = false, ApplyFontFormats = false, ApplyPatternFormats = false, ApplyAlignmentFormats = false, ApplyWidthHeightFormats = true, DataCaption = "Values", UpdatedVersion = 5, MinRefreshableVersion = 5, UseAutoFormatting = true, ItemPrintTitles = true, CreatedVersion = 4, Indent = (UInt32Value)0U, Outline = true, OutlineData = true, MultipleFieldFilters = false, ChartFormat = (UInt32Value)17U };
            Location location9 = new Location(){ Reference = "A1:B5", FirstHeaderRow = (UInt32Value)1U, FirstDataRow = (UInt32Value)1U, FirstDataColumn = (UInt32Value)1U };

            PivotFields pivotFields9 = new PivotFields(){ Count = (UInt32Value)7U };

            PivotField pivotField56 = new PivotField(){ NumberFormatId = (UInt32Value)14U, ShowAll = false };

            Items items31 = new Items(){ Count = (UInt32Value)15U };
            Item item270 = new Item(){ Index = (UInt32Value)0U };
            Item item271 = new Item(){ Index = (UInt32Value)1U };
            Item item272 = new Item(){ Index = (UInt32Value)2U };
            Item item273 = new Item(){ Index = (UInt32Value)3U };
            Item item274 = new Item(){ Index = (UInt32Value)4U };
            Item item275 = new Item(){ Index = (UInt32Value)5U };
            Item item276 = new Item(){ Index = (UInt32Value)6U };
            Item item277 = new Item(){ Index = (UInt32Value)7U };
            Item item278 = new Item(){ Index = (UInt32Value)8U };
            Item item279 = new Item(){ Index = (UInt32Value)9U };
            Item item280 = new Item(){ Index = (UInt32Value)10U };
            Item item281 = new Item(){ Index = (UInt32Value)11U };
            Item item282 = new Item(){ Index = (UInt32Value)12U };
            Item item283 = new Item(){ Index = (UInt32Value)13U };
            Item item284 = new Item(){ ItemType = ItemValues.Default };

            items31.Append(item270);
            items31.Append(item271);
            items31.Append(item272);
            items31.Append(item273);
            items31.Append(item274);
            items31.Append(item275);
            items31.Append(item276);
            items31.Append(item277);
            items31.Append(item278);
            items31.Append(item279);
            items31.Append(item280);
            items31.Append(item281);
            items31.Append(item282);
            items31.Append(item283);
            items31.Append(item284);

            pivotField56.Append(items31);

            PivotField pivotField57 = new PivotField(){ Axis = PivotTableAxisValues.AxisRow, ShowAll = false };

            Items items32 = new Items(){ Count = (UInt32Value)11U };
            Item item285 = new Item(){ Index = (UInt32Value)0U };
            Item item286 = new Item(){ Missing = true, Index = (UInt32Value)4U };
            Item item287 = new Item(){ Missing = true, Index = (UInt32Value)3U };
            Item item288 = new Item(){ Index = (UInt32Value)1U };
            Item item289 = new Item(){ Index = (UInt32Value)2U };
            Item item290 = new Item(){ Missing = true, Index = (UInt32Value)9U };
            Item item291 = new Item(){ Missing = true, Index = (UInt32Value)8U };
            Item item292 = new Item(){ Missing = true, Index = (UInt32Value)7U };
            Item item293 = new Item(){ Missing = true, Index = (UInt32Value)6U };
            Item item294 = new Item(){ Missing = true, Index = (UInt32Value)5U };
            Item item295 = new Item(){ ItemType = ItemValues.Default };

            items32.Append(item285);
            items32.Append(item286);
            items32.Append(item287);
            items32.Append(item288);
            items32.Append(item289);
            items32.Append(item290);
            items32.Append(item291);
            items32.Append(item292);
            items32.Append(item293);
            items32.Append(item294);
            items32.Append(item295);

            pivotField57.Append(items32);
            PivotField pivotField58 = new PivotField(){ DataField = true, ShowAll = false };
            PivotField pivotField59 = new PivotField(){ ShowAll = false };

            PivotField pivotField60 = new PivotField(){ NumberFormatId = (UInt32Value)14U, ShowAll = false };

            Items items33 = new Items(){ Count = (UInt32Value)5U };
            Item item296 = new Item(){ Index = (UInt32Value)0U };
            Item item297 = new Item(){ Index = (UInt32Value)1U };
            Item item298 = new Item(){ Index = (UInt32Value)3U };
            Item item299 = new Item(){ Index = (UInt32Value)2U };
            Item item300 = new Item(){ ItemType = ItemValues.Default };

            items33.Append(item296);
            items33.Append(item297);
            items33.Append(item298);
            items33.Append(item299);
            items33.Append(item300);

            pivotField60.Append(items33);
            PivotField pivotField61 = new PivotField(){ ShowAll = false };

            PivotField pivotField62 = new PivotField(){ ShowAll = false, DefaultSubtotal = false };

            Items items34 = new Items(){ Count = (UInt32Value)5U };
            Item item301 = new Item(){ Index = (UInt32Value)0U };
            Item item302 = new Item(){ Index = (UInt32Value)1U };
            Item item303 = new Item(){ Index = (UInt32Value)2U };
            Item item304 = new Item(){ Index = (UInt32Value)3U };
            Item item305 = new Item(){ Index = (UInt32Value)4U };

            items34.Append(item301);
            items34.Append(item302);
            items34.Append(item303);
            items34.Append(item304);
            items34.Append(item305);

            pivotField62.Append(items34);

            pivotFields9.Append(pivotField56);
            pivotFields9.Append(pivotField57);
            pivotFields9.Append(pivotField58);
            pivotFields9.Append(pivotField59);
            pivotFields9.Append(pivotField60);
            pivotFields9.Append(pivotField61);
            pivotFields9.Append(pivotField62);

            RowFields rowFields9 = new RowFields(){ Count = (UInt32Value)1U };
            Field field9 = new Field(){ Index = 1 };

            rowFields9.Append(field9);

            RowItems rowItems9 = new RowItems(){ Count = (UInt32Value)4U };

            RowItem rowItem41 = new RowItem();
            MemberPropertyIndex memberPropertyIndex33 = new MemberPropertyIndex();

            rowItem41.Append(memberPropertyIndex33);

            RowItem rowItem42 = new RowItem();
            MemberPropertyIndex memberPropertyIndex34 = new MemberPropertyIndex(){ Val = 3 };

            rowItem42.Append(memberPropertyIndex34);

            RowItem rowItem43 = new RowItem();
            MemberPropertyIndex memberPropertyIndex35 = new MemberPropertyIndex(){ Val = 4 };

            rowItem43.Append(memberPropertyIndex35);

            RowItem rowItem44 = new RowItem(){ ItemType = ItemValues.Grand };
            MemberPropertyIndex memberPropertyIndex36 = new MemberPropertyIndex();

            rowItem44.Append(memberPropertyIndex36);

            rowItems9.Append(rowItem41);
            rowItems9.Append(rowItem42);
            rowItems9.Append(rowItem43);
            rowItems9.Append(rowItem44);

            ColumnItems columnItems9 = new ColumnItems(){ Count = (UInt32Value)1U };
            RowItem rowItem45 = new RowItem();

            columnItems9.Append(rowItem45);

            DataFields dataFields9 = new DataFields(){ Count = (UInt32Value)1U };
            DataField dataField9 = new DataField(){ Name = "Sum of Quantity", Field = (UInt32Value)2U, BaseField = 0, BaseItem = (UInt32Value)0U };

            dataFields9.Append(dataField9);

            ChartFormats chartFormats9 = new ChartFormats(){ Count = (UInt32Value)13U };

            ChartFormat chartFormat70 = new ChartFormat(){ Chart = (UInt32Value)4U, Format = (UInt32Value)0U, Series = true };

            PivotArea pivotArea70 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences70 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference70 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem92 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference70.Append(fieldItem92);

            pivotAreaReferences70.Append(pivotAreaReference70);

            pivotArea70.Append(pivotAreaReferences70);

            chartFormat70.Append(pivotArea70);

            ChartFormat chartFormat71 = new ChartFormat(){ Chart = (UInt32Value)5U, Format = (UInt32Value)2U, Series = true };

            PivotArea pivotArea71 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences71 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference71 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem93 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference71.Append(fieldItem93);

            pivotAreaReferences71.Append(pivotAreaReference71);

            pivotArea71.Append(pivotAreaReferences71);

            chartFormat71.Append(pivotArea71);

            ChartFormat chartFormat72 = new ChartFormat(){ Chart = (UInt32Value)6U, Format = (UInt32Value)0U, Series = true };

            PivotArea pivotArea72 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences72 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference72 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem94 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference72.Append(fieldItem94);

            pivotAreaReferences72.Append(pivotAreaReference72);

            pivotArea72.Append(pivotAreaReferences72);

            chartFormat72.Append(pivotArea72);

            ChartFormat chartFormat73 = new ChartFormat(){ Chart = (UInt32Value)7U, Format = (UInt32Value)14U, Series = true };

            PivotArea pivotArea73 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences73 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference73 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem95 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference73.Append(fieldItem95);

            pivotAreaReferences73.Append(pivotAreaReference73);

            pivotArea73.Append(pivotAreaReferences73);

            chartFormat73.Append(pivotArea73);

            ChartFormat chartFormat74 = new ChartFormat(){ Chart = (UInt32Value)8U, Format = (UInt32Value)1U, Series = true };

            PivotArea pivotArea74 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences74 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference74 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem96 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference74.Append(fieldItem96);

            pivotAreaReferences74.Append(pivotAreaReference74);

            pivotArea74.Append(pivotAreaReferences74);

            chartFormat74.Append(pivotArea74);

            ChartFormat chartFormat75 = new ChartFormat(){ Chart = (UInt32Value)9U, Format = (UInt32Value)15U, Series = true };

            PivotArea pivotArea75 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences75 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference75 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem97 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference75.Append(fieldItem97);

            pivotAreaReferences75.Append(pivotAreaReference75);

            pivotArea75.Append(pivotAreaReferences75);

            chartFormat75.Append(pivotArea75);

            ChartFormat chartFormat76 = new ChartFormat(){ Chart = (UInt32Value)10U, Format = (UInt32Value)2U, Series = true };

            PivotArea pivotArea76 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences76 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference76 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem98 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference76.Append(fieldItem98);

            pivotAreaReferences76.Append(pivotAreaReference76);

            pivotArea76.Append(pivotAreaReferences76);

            chartFormat76.Append(pivotArea76);

            ChartFormat chartFormat77 = new ChartFormat(){ Chart = (UInt32Value)11U, Format = (UInt32Value)16U, Series = true };

            PivotArea pivotArea77 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences77 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference77 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem99 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference77.Append(fieldItem99);

            pivotAreaReferences77.Append(pivotAreaReference77);

            pivotArea77.Append(pivotAreaReferences77);

            chartFormat77.Append(pivotArea77);

            ChartFormat chartFormat78 = new ChartFormat(){ Chart = (UInt32Value)12U, Format = (UInt32Value)3U, Series = true };

            PivotArea pivotArea78 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences78 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference78 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem100 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference78.Append(fieldItem100);

            pivotAreaReferences78.Append(pivotAreaReference78);

            pivotArea78.Append(pivotAreaReferences78);

            chartFormat78.Append(pivotArea78);

            ChartFormat chartFormat79 = new ChartFormat(){ Chart = (UInt32Value)13U, Format = (UInt32Value)17U, Series = true };

            PivotArea pivotArea79 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences79 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference79 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem101 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference79.Append(fieldItem101);

            pivotAreaReferences79.Append(pivotAreaReference79);

            pivotArea79.Append(pivotAreaReferences79);

            chartFormat79.Append(pivotArea79);

            ChartFormat chartFormat80 = new ChartFormat(){ Chart = (UInt32Value)14U, Format = (UInt32Value)4U, Series = true };

            PivotArea pivotArea80 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences80 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference80 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem102 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference80.Append(fieldItem102);

            pivotAreaReferences80.Append(pivotAreaReference80);

            pivotArea80.Append(pivotAreaReferences80);

            chartFormat80.Append(pivotArea80);

            ChartFormat chartFormat81 = new ChartFormat(){ Chart = (UInt32Value)15U, Format = (UInt32Value)18U, Series = true };

            PivotArea pivotArea81 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences81 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference81 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem103 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference81.Append(fieldItem103);

            pivotAreaReferences81.Append(pivotAreaReference81);

            pivotArea81.Append(pivotAreaReferences81);

            chartFormat81.Append(pivotArea81);

            ChartFormat chartFormat82 = new ChartFormat(){ Chart = (UInt32Value)16U, Format = (UInt32Value)5U, Series = true };

            PivotArea pivotArea82 = new PivotArea(){ Type = PivotAreaValues.Data, Outline = false, FieldPosition = (UInt32Value)0U };

            PivotAreaReferences pivotAreaReferences82 = new PivotAreaReferences(){ Count = (UInt32Value)1U };

            PivotAreaReference pivotAreaReference82 = new PivotAreaReference(){ Field = (UInt32Value)4294967294U, Count = (UInt32Value)1U, Selected = false };
            FieldItem fieldItem104 = new FieldItem(){ Val = (UInt32Value)0U };

            pivotAreaReference82.Append(fieldItem104);

            pivotAreaReferences82.Append(pivotAreaReference82);

            pivotArea82.Append(pivotAreaReferences82);

            chartFormat82.Append(pivotArea82);

            chartFormats9.Append(chartFormat70);
            chartFormats9.Append(chartFormat71);
            chartFormats9.Append(chartFormat72);
            chartFormats9.Append(chartFormat73);
            chartFormats9.Append(chartFormat74);
            chartFormats9.Append(chartFormat75);
            chartFormats9.Append(chartFormat76);
            chartFormats9.Append(chartFormat77);
            chartFormats9.Append(chartFormat78);
            chartFormats9.Append(chartFormat79);
            chartFormats9.Append(chartFormat80);
            chartFormats9.Append(chartFormat81);
            chartFormats9.Append(chartFormat82);
            PivotTableStyle pivotTableStyle9 = new PivotTableStyle(){ Name = "PivotStyleLight16", ShowRowHeaders = true, ShowColumnHeaders = true, ShowRowStripes = false, ShowColumnStripes = false, ShowLastColumn = true };

            PivotFilters pivotFilters1 = new PivotFilters(){ Count = (UInt32Value)1U };

            PivotFilter pivotFilter1 = new PivotFilter(){ Field = (UInt32Value)4U, Type = PivotFilterValues.DateBetween, EvaluationOrder = -1, Id = (UInt32Value)6U, Name = "DeliveryDate" };

            AutoFilter autoFilter7 = new AutoFilter(){ Reference = "A1" };

            FilterColumn filterColumn1 = new FilterColumn(){ ColumnId = (UInt32Value)0U };

            CustomFilters customFilters1 = new CustomFilters(){ And = true };
            CustomFilter customFilter1 = new CustomFilter(){ Operator = FilterOperatorValues.GreaterThanOrEqual, Val = "36526" };
            CustomFilter customFilter2 = new CustomFilter(){ Operator = FilterOperatorValues.LessThanOrEqual, Val = "37986" };

            customFilters1.Append(customFilter1);
            customFilters1.Append(customFilter2);

            filterColumn1.Append(customFilters1);

            autoFilter7.Append(filterColumn1);

            PivotFilterExtensionList pivotFilterExtensionList1 = new PivotFilterExtensionList();

            PivotFilterExtension pivotFilterExtension1 = new PivotFilterExtension(){ Uri = "{0605FD5F-26C8-4aeb-8148-2DB25E43C511}" };
            pivotFilterExtension1.AddNamespaceDeclaration("x15", "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main");
            X15.PivotFilter pivotFilter2 = new X15.PivotFilter(){ UseWholeDay = true };

            pivotFilterExtension1.Append(pivotFilter2);

            pivotFilterExtensionList1.Append(pivotFilterExtension1);

            pivotFilter1.Append(autoFilter7);
            pivotFilter1.Append(pivotFilterExtensionList1);

            pivotFilters1.Append(pivotFilter1);

            PivotTableDefinitionExtensionList pivotTableDefinitionExtensionList9 = new PivotTableDefinitionExtensionList();

            PivotTableDefinitionExtension pivotTableDefinitionExtension9 = new PivotTableDefinitionExtension(){ Uri = "{962EF5D1-5CA2-4c93-8EF4-DBF5C05439D2}" };
            pivotTableDefinitionExtension9.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");

            X14.PivotTableDefinition pivotTableDefinition18 = new X14.PivotTableDefinition(){ HideValuesRow = true };
            pivotTableDefinition18.AddNamespaceDeclaration("xm", "http://schemas.microsoft.com/office/excel/2006/main");

            pivotTableDefinitionExtension9.Append(pivotTableDefinition18);

            pivotTableDefinitionExtensionList9.Append(pivotTableDefinitionExtension9);

            pivotTableDefinition17.Append(location9);
            pivotTableDefinition17.Append(pivotFields9);
            pivotTableDefinition17.Append(rowFields9);
            pivotTableDefinition17.Append(rowItems9);
            pivotTableDefinition17.Append(columnItems9);
            pivotTableDefinition17.Append(dataFields9);
            pivotTableDefinition17.Append(chartFormats9);
            pivotTableDefinition17.Append(pivotTableStyle9);
            pivotTableDefinition17.Append(pivotFilters1);
            pivotTableDefinition17.Append(pivotTableDefinitionExtensionList9);

            pivotTablePart9.PivotTableDefinition = pivotTableDefinition17;
        }
コード例 #9
0
        // Generates content of tableDefinitionPart1.
        private void GenerateTableDefinitionPart1Content(TableDefinitionPart tableDefinitionPart1)
        {
            Table table1 = new Table(){ Id = (UInt32Value)1U, Name = "Table_Query", DisplayName = "Table_Query", Reference = "B2:I13", TableType = TableValues.QueryTable, TotalsRowShown = false };
            AutoFilter autoFilter1 = new AutoFilter(){ Reference = "B2:I13" };

            TableColumns tableColumns1 = new TableColumns(){ Count = (UInt32Value)8U };
            TableColumn tableColumn1 = new TableColumn(){ Id = (UInt32Value)1U, UniqueName = "1", Name = "account_id", QueryTableFieldId = (UInt32Value)1U };
            TableColumn tableColumn2 = new TableColumn(){ Id = (UInt32Value)2U, UniqueName = "2", Name = "account_parent", QueryTableFieldId = (UInt32Value)2U };
            TableColumn tableColumn3 = new TableColumn(){ Id = (UInt32Value)3U, UniqueName = "3", Name = "account_description", QueryTableFieldId = (UInt32Value)3U };
            TableColumn tableColumn4 = new TableColumn(){ Id = (UInt32Value)4U, UniqueName = "4", Name = "account_type", QueryTableFieldId = (UInt32Value)4U };
            TableColumn tableColumn5 = new TableColumn(){ Id = (UInt32Value)5U, UniqueName = "5", Name = "account_rollup", QueryTableFieldId = (UInt32Value)5U };
            TableColumn tableColumn6 = new TableColumn(){ Id = (UInt32Value)6U, UniqueName = "6", Name = "Custom Members", QueryTableFieldId = (UInt32Value)6U };
            TableColumn tableColumn7 = new TableColumn(){ Id = (UInt32Value)7U, UniqueName = "7", Name = "CurrentUser", QueryTableFieldId = (UInt32Value)7U };
            TableColumn tableColumn8 = new TableColumn(){ Id = (UInt32Value)8U, UniqueName = "8", Name = "RefreshTime", QueryTableFieldId = (UInt32Value)8U, DataFormatId = (UInt32Value)0U };

            tableColumns1.Append(tableColumn1);
            tableColumns1.Append(tableColumn2);
            tableColumns1.Append(tableColumn3);
            tableColumns1.Append(tableColumn4);
            tableColumns1.Append(tableColumn5);
            tableColumns1.Append(tableColumn6);
            tableColumns1.Append(tableColumn7);
            tableColumns1.Append(tableColumn8);
            TableStyleInfo tableStyleInfo1 = new TableStyleInfo(){ Name = "TableStyleMedium2", ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };

            table1.Append(autoFilter1);
            table1.Append(tableColumns1);
            table1.Append(tableStyleInfo1);

            tableDefinitionPart1.Table = table1;
        }