コード例 #1
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;
        }
コード例 #2
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;
        }