コード例 #1
0
        private TableProperties GenerateTableProperties()
        {
            TableProperties tableProperties1 = new TableProperties();
            TableWidth tableWidth1 = new TableWidth() { Width = "9639", Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);
            TableLayout tableLayout1 = new TableLayout() { Type = TableLayoutValues.Fixed };
            TableLook tableLook1 = new TableLook() { Val = "04A0" };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableLayout1);
            tableProperties1.Append(tableLook1);
            return tableProperties1;
        }
コード例 #2
0
        private static Stylesheet CreateStylesheet()
        {
            Stylesheet stylesheet1 = new Stylesheet()
            {
                MCAttributes = new MarkupCompatibilityAttributes()
                {
                    Ignorable = "x14ac"
                }
            };

            stylesheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            stylesheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");

            Fonts fonts1 = new Fonts()
            {
                Count = (UInt32Value)2U,
                KnownFonts
                    = true
            };

            //Normal Font
            DocumentFormat.OpenXml.Spreadsheet.Font font1 =
                new DocumentFormat.OpenXml.Spreadsheet.Font();
            DocumentFormat.OpenXml.Spreadsheet.FontSize fontSize1 =
                new DocumentFormat.OpenXml.Spreadsheet.FontSize()
            {
                Val = 11D
            };
            DocumentFormat.OpenXml.Spreadsheet.Color color1 =
                new DocumentFormat.OpenXml.Spreadsheet.Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName fontName1 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering1 =
                new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme1 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font1.Append(fontSize1);
            font1.Append(color1);
            font1.Append(fontName1);
            font1.Append(fontFamilyNumbering1);
            font1.Append(fontScheme1);
            fonts1.Append(font1);

            //Bold Font
            DocumentFormat.OpenXml.Spreadsheet.Font bFont =
                new DocumentFormat.OpenXml.Spreadsheet.Font();
            DocumentFormat.OpenXml.Spreadsheet.FontSize bfontSize =
                new DocumentFormat.OpenXml.Spreadsheet.FontSize()
            {
                Val = 11D
            };
            DocumentFormat.OpenXml.Spreadsheet.Color bcolor =
                new DocumentFormat.OpenXml.Spreadsheet.Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName bfontName = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering bfontFamilyNumbering =
                new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme bfontScheme = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };
            Bold bFontBold = new Bold();

            bFont.Append(bfontSize);
            bFont.Append(bcolor);
            bFont.Append(bfontName);
            bFont.Append(bfontFamilyNumbering);
            bFont.Append(bfontScheme);
            bFont.Append(bFontBold);

            fonts1.Append(bFont);


            Fills fills1 = new Fills()
            {
                Count = (UInt32Value)6U
            };

            // FillId = 0
            Fill        fill1        = new Fill();
            PatternFill patternFill1 = new PatternFill()
            {
                PatternType = PatternValues.None
            };

            fill1.Append(patternFill1);

            // FillId = 1
            Fill        fill2        = new Fill();
            PatternFill patternFill2 = new PatternFill()
            {
                PatternType = PatternValues.Gray125
            };

            fill2.Append(patternFill2);

            // FillId = 2,RED
            Fill        fill3        = new Fill();
            PatternFill patternFill3 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor1 = new ForegroundColor()
            {
                Rgb = "5c881a"
            };
            BackgroundColor backgroundColor1 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };                                                                                       //

            patternFill3.Append(foregroundColor1);
            patternFill3.Append(backgroundColor1);
            fill3.Append(patternFill3);

            // FillId = 3,BLUE
            Fill        fill4        = new Fill();
            PatternFill patternFill4 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor2 = new ForegroundColor()
            {
                Rgb = "0070c0"
            };
            BackgroundColor backgroundColor2 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill4.Append(foregroundColor2);
            patternFill4.Append(backgroundColor2);
            fill4.Append(patternFill4);

            // FillId = 4,YELLO
            Fill        fill5        = new Fill();
            PatternFill patternFill5 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor3 = new ForegroundColor()
            {
                Rgb = "FFFFFF00"
            };
            BackgroundColor backgroundColor3 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill5.Append(foregroundColor3);
            patternFill5.Append(backgroundColor3);
            fill5.Append(patternFill5);

            // FillId = 5,RED and BOLD Text
            Fill        fill6        = new Fill();
            PatternFill patternFill6 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor4 = new ForegroundColor()
            {
                Rgb = "5c881a"
            };
            BackgroundColor backgroundColor4 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };
            Bold bold1 = new Bold();

            patternFill6.Append(bold1);
            patternFill6.Append(foregroundColor4);
            patternFill6.Append(backgroundColor4);
            fill6.Append(patternFill6);


            fills1.Append(fill1);
            fills1.Append(fill2);
            fills1.Append(fill3);
            fills1.Append(fill4);
            fills1.Append(fill5);
            fills1.Append(fill6);

            Borders borders1 = new Borders()
            {
                Count = (UInt32Value)1U
            };

            Border         border1         = new Border();
            LeftBorder     leftBorder1     = new LeftBorder();
            RightBorder    rightBorder1    = new RightBorder();
            TopBorder      topBorder1      = new TopBorder();
            BottomBorder   bottomBorder1   = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);

            borders1.Append(border1);

            CellStyleFormats cellStyleFormats1 = new CellStyleFormats()
            {
                Count = (UInt32Value)1U
            };
            CellFormat cellFormat1 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U
            };

            cellStyleFormats1.Append(cellFormat1);

            CellFormats cellFormats1 = new CellFormats()
            {
                Count = (UInt32Value)4U
            };

            CellFormat cellFormat2 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            CellFormat cellFormat3 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true
            };
            CellFormat cellFormat4 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true
            };
            CellFormat cellFormat5 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)4U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true
            };

            cellFormats1.Append(cellFormat2);
            cellFormats1.Append(cellFormat3);
            cellFormats1.Append(cellFormat4);
            cellFormats1.Append(cellFormat5);

            CellStyles cellStyles1 = new CellStyles()
            {
                Count = (UInt32Value)1U
            };
            CellStyle cellStyle1 = new CellStyle()
            {
                Name = "Normal", FormatId = (UInt32Value)0U, BuiltinId = (UInt32Value)0U
            };

            cellStyles1.Append(cellStyle1);
            DifferentialFormats differentialFormats1 = new DifferentialFormats()
            {
                Count = (UInt32Value)0U
            };
            TableStyles tableStyles1 = new TableStyles()
            {
                Count = (UInt32Value)0U, DefaultTableStyle = "TableStyleMedium2", DefaultPivotStyle = "PivotStyleMedium9"
            };

            StylesheetExtensionList stylesheetExtensionList1 = new StylesheetExtensionList();

            StylesheetExtension stylesheetExtension1 = new StylesheetExtension()
            {
                Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"
            };

            stylesheetExtension1.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            X14.SlicerStyles slicerStyles1 = new X14.SlicerStyles()
            {
                DefaultSlicerStyle = "SlicerStyleLight1"
            };

            stylesheetExtension1.Append(slicerStyles1);

            stylesheetExtensionList1.Append(stylesheetExtension1);

            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);
            stylesheet1.Append(tableStyles1);
            stylesheet1.Append(stylesheetExtensionList1);
            return(stylesheet1);
        }
コード例 #3
0
        /// <summary>
        /// Создает стилевую составляющую документа
        /// </summary>
        /// <param name="workbookStylesPart">Стилевая часть книги</param>
        private void GenerateStyles(WorkbookStylesPart workbookStylesPart)
        {
            Stylesheet stylesheet = new Stylesheet()
            {
                MCAttributes = new MarkupCompatibilityAttributes()
                {
                    Ignorable = "x14ac"
                }
            };

            stylesheet.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            stylesheet.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");

            #region Fonts
            Fonts fonts = new Fonts()
            {
                Count      = 1U,
                KnownFonts = true
            };
            Font     font     = new Font();
            FontSize fontSize = new FontSize()
            {
                Val = 11D
            };
            Color color1 = new Color()
            {
                Theme = 1U
            };
            FontName fontName = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontCharSet fontCharSet = new FontCharSet()
            {
                Val = 204
            };
            FontScheme fontScheme = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font.Append(fontSize);
            font.Append(color1);
            font.Append(fontName);
            font.Append(fontFamilyNumbering);
            font.Append(fontCharSet);
            font.Append(fontScheme);

            fonts.Append(font);
            #endregion

            #region Fills
            Fills fills = new Fills()
            {
                Count = 2U
            };

            Fill        fill1        = new Fill();
            PatternFill patternFill1 = new PatternFill()
            {
                PatternType = PatternValues.None
            };
            fill1.Append(patternFill1);

            Fill        fill2        = new Fill();
            PatternFill patternFill2 = new PatternFill()
            {
                PatternType = PatternValues.Gray125
            };
            fill2.Append(patternFill2);

            fills.Append(fill1);
            fills.Append(fill2);
            #endregion

            #region Borders
            Borders borders = new Borders()
            {
                Count = 1U
            };

            Border         border1         = new Border();
            LeftBorder     leftBorder1     = new LeftBorder();
            RightBorder    rightBorder1    = new RightBorder();
            TopBorder      topBorder1      = new TopBorder();
            BottomBorder   bottomBorder    = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder);
            border1.Append(diagonalBorder1);

            borders.Append(border1);
            #endregion

            #region Cell Styles And Formats
            CellStyleFormats cellStyleFormats = new CellStyleFormats()
            {
                Count = 1U
            };
            CellFormat cellFormat1 = new CellFormat()
            {
                NumberFormatId = 0U,
                FontId         = 0U,
                FillId         = 0U,
                BorderId       = 0U
            };
            cellStyleFormats.Append(cellFormat1);

            CellFormats cellFormats = new CellFormats()
            {
                Count = 1U
            };
            CellFormat cellFormat2 = new CellFormat()
            {
                NumberFormatId = 0U,
                FontId         = 0U,
                FillId         = 0U,
                BorderId       = 0U,
                FormatId       = 0U
            };

            cellFormats.Append(cellFormat2);

            CellStyles cellStyles = new CellStyles()
            {
                Count = 1U
            };
            CellStyle cellStyle = new CellStyle()
            {
                Name      = "Обычный",
                FormatId  = 0U,
                BuiltinId = 0U
            };
            cellStyles.Append(cellStyle);
            #endregion

            DifferentialFormats differentialFormats = new DifferentialFormats()
            {
                Count = 0U
            };
            TableStyles tableStyles = new TableStyles()
            {
                Count             = 0U,
                DefaultTableStyle = "TableStyleMedium2",
                DefaultPivotStyle = "PivotStyleLight16"
            };

            #region Stylesheet Extensions
            StylesheetExtensionList stylesheetExtensionList = new StylesheetExtensionList();

            StylesheetExtension stylesheetExtension1 = new StylesheetExtension()
            {
                Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"
            };
            stylesheetExtension1.AddNamespaceDeclaration("x14",
                                                         "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            X14.SlicerStyles slicerStyles = new X14.SlicerStyles()
            {
                DefaultSlicerStyle = "SlicerStyleLight1"
            };
            stylesheetExtension1.Append(slicerStyles);

            StylesheetExtension stylesheetExtension2 = new StylesheetExtension()
            {
                Uri = "{9260A510-F301-46a8-8635-F512D64BE5F5}"
            };
            stylesheetExtension2.AddNamespaceDeclaration("x15",
                                                         "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main");

            OpenXmlUnknownElement unknownElement =
                OpenXmlUnknownElement.CreateOpenXmlUnknownElement(
                    "<x15:timelineStyles defaultTimelineStyle=\"TimeSlicerStyleLight1\" xmlns:x15=\"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main\" />");
            stylesheetExtension2.Append(unknownElement);

            stylesheetExtensionList.Append(stylesheetExtension1);
            stylesheetExtensionList.Append(stylesheetExtension2);
            #endregion

            stylesheet.Append(fonts);
            stylesheet.Append(fills);
            stylesheet.Append(borders);
            stylesheet.Append(cellStyleFormats);
            stylesheet.Append(cellFormats);
            stylesheet.Append(cellStyles);
            stylesheet.Append(differentialFormats);
            stylesheet.Append(tableStyles);
            stylesheet.Append(stylesheetExtensionList);

            workbookStylesPart.Stylesheet = stylesheet;
        }
コード例 #4
0
        // Generates content of workbookStylesPart1.
        // (borders needed for user to resize tables). Other style content skipped.
        private static void GenerateWorkbookStylesContent(WorkbookStylesPart workbookStylesPart1)
        {
            Stylesheet stylesheet1 = new Stylesheet();
            // if your data includes a table, this renders the blue borders to make it easier to see.
            DifferentialFormats differentialFormats1 = new DifferentialFormats()
            {
                Count = (UInt32Value)2U
            };
            DifferentialFormat differentialFormat1 = new DifferentialFormat();
            NumberingFormat    numberingFormat1    = new NumberingFormat()
            {
                NumberFormatId = (UInt32Value)1U, FormatCode = "0"
            };

            differentialFormat1.Append(numberingFormat1);
            DifferentialFormat differentialFormat2 = new DifferentialFormat();
            Border             border3             = new Border()
            {
                DiagonalUp = false, DiagonalDown = false
            };
            LeftBorder leftBorder3 = new LeftBorder()
            {
                Style = BorderStyleValues.Thin
            };
            Color color5 = new Color()
            {
                Indexed = (UInt32Value)12U
            };

            leftBorder3.Append(color5);
            RightBorder rightBorder3 = new RightBorder()
            {
                Style = BorderStyleValues.Thin
            };
            Color color6 = new Color()
            {
                Indexed = (UInt32Value)12U
            };

            rightBorder3.Append(color6);
            TopBorder topBorder3 = new TopBorder()
            {
                Style = BorderStyleValues.Thin
            };
            Color color7 = new Color()
            {
                Indexed = (UInt32Value)12U
            };

            topBorder3.Append(color7);
            BottomBorder bottomBorder3 = new BottomBorder()
            {
                Style = BorderStyleValues.Thin
            };
            Color color8 = new Color()
            {
                Indexed = (UInt32Value)12U
            };

            bottomBorder3.Append(color8);
            border3.Append(leftBorder3);
            border3.Append(rightBorder3);
            border3.Append(topBorder3);
            border3.Append(bottomBorder3);
            differentialFormat2.Append(border3);
            differentialFormats1.Append(differentialFormat1);
            differentialFormats1.Append(differentialFormat2);
            stylesheet1.Append(differentialFormats1); // border used for table
            workbookStylesPart1.Stylesheet = stylesheet1;
        }
コード例 #5
0
        private TableCell CreateNoBorderCell(string text)
        {
            TableCellProperties tableCellProperties = new TableCellProperties();
            int cellWidth = CalcTextWidth(text.Length);

            TableCellWidth tableCellWidth = new TableCellWidth() { Width = cellWidth.ToString(), Type = TableWidthUnitValues.Dxa };
            TableCellBorders tableCellBorders1 = new TableCellBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Nil };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Nil };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Nil };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Nil };

            tableCellBorders1.Append(topBorder1);
            tableCellBorders1.Append(leftBorder1);
            tableCellBorders1.Append(bottomBorder1);
            tableCellBorders1.Append(rightBorder1);

            tableCellProperties.Append(tableCellWidth);
            tableCellProperties.Append(tableCellBorders1);

            TableCell tableCell = new TableCell();
            tableCell.Append(tableCellProperties);
            tableCell.Append(CreateTextParagraph(text));
            return tableCell;
        }
コード例 #6
0
ファイル: CreateTable.cs プロジェクト: y0y0alice/OA
        // Creates an Table instance and adds its children.
        public static Table GenerateTable(Document doc, System.Data.DataTable datetable)
        {
            Table table = new Table();
            //
            PageSize pagesize = doc.Body.Descendants<PageSize>().First();
            PageMargin pagemargin = doc.Body.Descendants<PageMargin>().First();
            //
            var AvailableSumWidth = (int)(pagesize.Width - pagemargin.Right - pagemargin.Left);

            TableBorders tborder = new Func<TableBorders>(delegate()
            {
                TableBorders tableBorders1 = new TableBorders();
                TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

                tableBorders1.Append(topBorder1);
                tableBorders1.Append(leftBorder1);
                tableBorders1.Append(bottomBorder1);
                tableBorders1.Append(rightBorder1);
                tableBorders1.Append(insideHorizontalBorder1);
                tableBorders1.Append(insideVerticalBorder1);
                return tableBorders1;
            })();

            table.AppendChild<TableProperties>(new TableProperties(
               new TableStyle() { Val = "a7" },
               tborder,
               new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto },
               new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true }
            ));

            int sumColumn = datetable.Columns.Count;

            int averwidth = AvailableSumWidth / sumColumn;

            Double set_colSumW = 0;
            int remainSumW = 0;
            foreach (System.Data.DataColumn item in datetable.Columns)
            {
                Object col_w = item.ExtendedProperties["width"];
                if (col_w != null) { set_colSumW += Convert.ToDouble(col_w); remainSumW += averwidth; }
            }

            foreach (System.Data.DataColumn item in datetable.Columns)
            {
                Object col_w = item.ExtendedProperties["width"];
                if (col_w != null) item.ExtendedProperties.Add("WordWidth", Math.Floor((remainSumW * Convert.ToDouble(col_w) / set_colSumW)));
                else item.ExtendedProperties.Add("WordWidth", averwidth);
            }

            for (int i = 0; i < sumColumn; i++)
            {
                int col_w = Convert.ToInt32(datetable.Columns[i].ExtendedProperties["WordWidth"]);
                table.AppendChild<GridColumn>(new GridColumn() { Width = col_w.ToString() });
            }
            List<System.Data.DataRow> lstCol = new List<System.Data.DataRow>();
            System.Data.DataRow dr = datetable.NewRow();
            List<object> lstObj = new List<object>();

            foreach (System.Data.DataColumn item in datetable.Columns)
            {
                lstObj.Add(item.ColumnName);
            }

            dr.ItemArray = lstObj.ToArray();
            datetable.Rows.InsertAt(dr, 0);

            foreach (System.Data.DataRow item in datetable.Rows)
            {
                TableRow tableRow = new TableRow() { RsidTableRowAddition = "00D24D12", RsidTableRowProperties = "00D24D12" };
                for (int i = 0; i < sumColumn; i++)
                {
                    int col_w = Convert.ToInt32(datetable.Columns[i].ExtendedProperties["WordWidth"]);

                    string cellValue = item[i].ToString();
                    TableCell tableCell1 = new TableCell();

                    TableCellProperties tableCellProperties1 = new TableCellProperties();
                    TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = col_w.ToString(), Type = TableWidthUnitValues.Dxa };

                    tableCellProperties1.Append(tableCellWidth1);

                    Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00D24D12", RsidParagraphProperties = "003246FB", RsidRunAdditionDefault = "00D24D12" };

                    Run run1 = new Run();

                    RunProperties runProperties1 = new RunProperties();
                    RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };

                    runProperties1.Append(runFonts1);
                    Text text1 = new Text();
                    text1.Text = cellValue;

                    run1.Append(runProperties1);
                    run1.Append(text1);
                    BookmarkStart bookmarkStart1 = new BookmarkStart();
                    BookmarkEnd bookmarkEnd1 = new BookmarkEnd();

                    paragraph1.Append(run1);
                    paragraph1.Append(bookmarkStart1);
                    paragraph1.Append(bookmarkEnd1);

                    tableCell1.Append(tableCellProperties1);
                    tableCell1.Append(paragraph1);

                    tableRow.Append(tableCell1);
                }
                table.Append(tableRow);
            }
            return table;
        }
コード例 #7
0
        // Generates content of workbookStylesPart1.
        private void GenerateWorkbookStylesPart1Content(WorkbookStylesPart workbookStylesPart1)
        {
            Stylesheet stylesheet1 = new Stylesheet();
            Fonts fonts1 = new Fonts() { Count = (UInt32Value)1U, KnownFonts = true };
            Font font1 = new Font();
            FontSize fontSize1 = new FontSize() { Val = 11D };
            Color color1 = new Color() { Theme = (UInt32Value)1U };
            FontName fontName1 = new FontName() { Val = "Calibri" };
            FontFamilyNumbering fontFamilyNumbering1 = new FontFamilyNumbering() { Val = 2 };
            FontScheme fontScheme1 = new FontScheme() { Val = FontSchemeValues.Minor };

            font1.Append(fontSize1);
            font1.Append(color1);
            font1.Append(fontName1);
            font1.Append(fontFamilyNumbering1);
            font1.Append(fontScheme1);

            fonts1.Append(font1);

            Fills fills1 = new Fills() { Count = (UInt32Value)2U };
            Fill fill1 = new Fill();
            PatternFill patternFill1 = new PatternFill() { PatternType = PatternValues.None };
            fill1.Append(patternFill1);

            Fill fill2 = new Fill();
            PatternFill patternFill2 = new PatternFill() { PatternType = PatternValues.Gray125 };
            fill2.Append(patternFill2);

            fills1.Append(fill1);
            fills1.Append(fill2);

            Borders borders1 = new Borders() { Count = (UInt32Value)1U };

            Border border1 = new Border();
            LeftBorder leftBorder1 = new LeftBorder();
            RightBorder rightBorder1 = new RightBorder();
            TopBorder topBorder1 = new TopBorder();
            BottomBorder bottomBorder1 = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);

            borders1.Append(border1);

            CellStyleFormats cellStyleFormats1 = new CellStyleFormats() { Count = (UInt32Value)1U };
            CellFormat cellFormat1 = new CellFormat() { NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U };

            cellStyleFormats1.Append(cellFormat1);

            CellFormats cellFormats1 = new CellFormats() { Count = (UInt32Value)4U };
            CellFormat cellFormat2 = new CellFormat() { NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U };
            CellFormat cellFormat3 = new CellFormat() { NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true };
            CellFormat cellFormat4 = new CellFormat() { NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, PivotButton = true };
            CellFormat cellFormat5 = new CellFormat() { NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyAlignment = true };

            cellFormats1.Append(cellFormat2);
            cellFormats1.Append(cellFormat3);
            cellFormats1.Append(cellFormat4);
            cellFormats1.Append(cellFormat5);

            CellStyles cellStyles1 = new CellStyles() { Count = (UInt32Value)1U };
            CellStyle cellStyle1 = new CellStyle() { Name = "Normal", FormatId = (UInt32Value)0U, BuiltinId = (UInt32Value)0U };

            cellStyles1.Append(cellStyle1);
            DifferentialFormats differentialFormats1 = new DifferentialFormats() { Count = (UInt32Value)0U };

            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);

            workbookStylesPart1.Stylesheet = stylesheet1;
        }
コード例 #8
0
        private static TableRow CreateAdditionalCourseRow(AdditionalCoursesItem additionalCourse)
        {
            TableRow tableRow2 = new TableRow()
            {
                RsidTableRowAddition = "009B2C1D", ParagraphId = "78EC2050", TextId = "77777777"
            };

            TableRowProperties tableRowProperties1 = new TableRowProperties();
            GridAfter          gridAfter1          = new GridAfter()
            {
                Val = 1
            };
            WidthAfterTableRow widthAfterTableRow1 = new WidthAfterTableRow()
            {
                Width = "360", Type = TableWidthUnitValues.Dxa
            };

            tableRowProperties1.Append(gridAfter1);
            tableRowProperties1.Append(widthAfterTableRow1);

            TableCell tableCell2 = new TableCell();

            TableCellProperties tableCellProperties2 = new TableCellProperties();
            TableCellWidth      tableCellWidth2      = new TableCellWidth()
            {
                Width = "2550", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders2 = new TableCellBorders();
            TopBorder        topBorder3        = new TopBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder3 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder3 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder3 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };

            tableCellBorders2.Append(topBorder3);
            tableCellBorders2.Append(leftBorder3);
            tableCellBorders2.Append(bottomBorder3);
            tableCellBorders2.Append(rightBorder3);

            tableCellProperties2.Append(tableCellWidth2);
            tableCellProperties2.Append(tableCellBorders2);

            Paragraph paragraph2 = new Paragraph()
            {
                RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "1D1F29ED", TextId = "111BDF87"
            };

            Run run3 = new Run();

            RunProperties runProperties3 = new RunProperties();
            FontSize      fontSize3      = new FontSize()
            {
                Val = "22"
            };
            FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript()
            {
                Val = "22"
            };

            runProperties3.Append(fontSize3);
            runProperties3.Append(fontSizeComplexScript3);
            Text text3 = new Text()
            {
                Space = SpaceProcessingModeValues.Preserve
            };

            text3.Text = $"{additionalCourse.AmountOfDays} {GetDay(additionalCourse.AmountOfDays)} / {additionalCourse.Year} ";

            run3.Append(runProperties3);
            run3.Append(text3);

            paragraph2.Append(run3);

            tableCell2.Append(tableCellProperties2);
            tableCell2.Append(paragraph2);

            TableCell tableCell3 = new TableCell();

            TableCellProperties tableCellProperties3 = new TableCellProperties();
            TableCellWidth      tableCellWidth3      = new TableCellWidth()
            {
                Width = "5700", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders3 = new TableCellBorders();
            TopBorder        topBorder4        = new TopBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder4 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)1U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder4 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder4 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };

            tableCellBorders3.Append(topBorder4);
            tableCellBorders3.Append(leftBorder4);
            tableCellBorders3.Append(bottomBorder4);
            tableCellBorders3.Append(rightBorder4);

            tableCellProperties3.Append(tableCellWidth3);
            tableCellProperties3.Append(tableCellBorders3);

            Paragraph paragraph3 = new Paragraph()
            {
                RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "4F98306E", TextId = "77777777"
            };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines()
            {
                After = "100", Line = "240", LineRule = LineSpacingRuleValues.Auto
            };
            Indentation indentation1 = new Indentation()
            {
                Left = "144"
            };

            paragraphProperties1.Append(spacingBetweenLines1);
            paragraphProperties1.Append(indentation1);

            Run run4 = new Run();

            RunProperties runProperties4 = new RunProperties();
            Bold          bold2          = new Bold();
            FontSize      fontSize4      = new FontSize()
            {
                Val = "22"
            };
            FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript()
            {
                Val = "22"
            };

            runProperties4.Append(bold2);
            runProperties4.Append(fontSize4);
            runProperties4.Append(fontSizeComplexScript4);
            Text text4 = new Text();

            text4.Text = additionalCourse.CourseName.ToUpper();

            run4.Append(runProperties4);
            run4.Append(text4);

            paragraph3.Append(paragraphProperties1);
            paragraph3.Append(run4);

            Paragraph paragraph4 = new Paragraph()
            {
                RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "1C86C2CE", TextId = "77777777"
            };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines()
            {
                After = "100", Line = "240", LineRule = LineSpacingRuleValues.Auto
            };
            Indentation indentation2 = new Indentation()
            {
                Left = "144"
            };

            paragraphProperties2.Append(spacingBetweenLines2);
            paragraphProperties2.Append(indentation2);

            Run run5 = new Run();

            RunProperties runProperties5 = new RunProperties();
            FontSize      fontSize5      = new FontSize()
            {
                Val = "22"
            };
            FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript()
            {
                Val = "22"
            };

            runProperties5.Append(fontSize5);
            runProperties5.Append(fontSizeComplexScript5);
            Text text5 = new Text();

            text5.Text = additionalCourse.Instructor;

            run5.Append(runProperties5);
            run5.Append(text5);

            paragraph4.Append(paragraphProperties2);
            paragraph4.Append(run5);

            tableCell3.Append(tableCellProperties3);
            tableCell3.Append(paragraph3);
            tableCell3.Append(paragraph4);

            tableRow2.Append(tableRowProperties1);
            tableRow2.Append(tableCell2);
            tableRow2.Append(tableCell3);

            return(tableRow2);
        }
コード例 #9
0
        internal static void ApplyBorders(OpenXmlCompositeElement element,
                                          string borderStyle,
                                          string leftBorderStyle,
                                          string topBorderStyle,
                                          string rightBorderStyle,
                                          string bottomBorderStyle,
                                          bool useDefaultBorder)
        {
            BorderValues borderValue = BorderValues.None;
            string       color       = string.Empty;
            UInt32       width       = 0;
            bool         hasBorder   = false;

            if (!string.IsNullOrEmpty(borderStyle))
            {
                hasBorder = true;
                GetBorderProperties(borderStyle, out borderValue, out color, out width);
            }

            if (!string.IsNullOrEmpty(topBorderStyle))
            {
                ApplyBorder <TopBorder>(topBorderStyle, element);
            }
            else if (hasBorder)
            {
                TopBorder topBorder = GetBorderType <TopBorder>(borderValue, color, width);

                if (topBorder != null)
                {
                    element.Append(topBorder);
                }
            }
            else if (useDefaultBorder)
            {
                ApplyDefaultBorder <TopBorder>(element);
            }

            if (!string.IsNullOrEmpty(leftBorderStyle))
            {
                ApplyBorder <LeftBorder>(leftBorderStyle, element);
            }
            else if (hasBorder)
            {
                LeftBorder leftBorder = GetBorderType <LeftBorder>(borderValue, color, width);

                if (leftBorder != null)
                {
                    element.Append(leftBorder);
                }
            }
            else if (useDefaultBorder)
            {
                ApplyDefaultBorder <LeftBorder>(element);
            }

            if (!string.IsNullOrEmpty(bottomBorderStyle))
            {
                ApplyBorder <BottomBorder>(bottomBorderStyle, element);
            }
            else if (hasBorder)
            {
                BottomBorder bottomBorder = GetBorderType <BottomBorder>(borderValue, color, width);

                if (bottomBorder != null)
                {
                    element.Append(bottomBorder);
                }
            }
            else if (useDefaultBorder)
            {
                ApplyDefaultBorder <BottomBorder>(element);
            }

            if (!string.IsNullOrEmpty(rightBorderStyle))
            {
                ApplyBorder <RightBorder>(rightBorderStyle, element);
            }
            else if (hasBorder)
            {
                RightBorder rightBorder = GetBorderType <RightBorder>(borderValue, color, width);

                if (rightBorder != null)
                {
                    element.Append(rightBorder);
                }
            }
            else if (useDefaultBorder)
            {
                ApplyDefaultBorder <RightBorder>(element);
            }
        }
コード例 #10
0
        public static Stylesheet GenerateStylesheet()
        {
            Stylesheet stylesheet1 = new Stylesheet()
            {
                MCAttributes = new MarkupCompatibilityAttributes()
                {
                    Ignorable = "x14ac"
                }
            };

            stylesheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            stylesheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");

            Fonts fonts1 = new Fonts()
            {
                Count = (UInt32Value)3U, KnownFonts = true
            };

            Font     font1     = new Font();
            FontSize fontSize1 = new FontSize()
            {
                Val = 14D
            };
            Color color1 = new Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName fontName1 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering1 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme1 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font1.Append(fontSize1);
            font1.Append(color1);
            font1.Append(fontName1);
            font1.Append(fontFamilyNumbering1);
            font1.Append(fontScheme1);

            Font     font2     = new Font();
            Bold     bold2     = new Bold();
            FontSize fontSize2 = new FontSize()
            {
                Val = 18D
            };
            Color color2 = new Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName fontName2 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering2 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme2 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font2.Append(bold2);
            font2.Append(fontSize2);
            font2.Append(color2);
            font2.Append(fontName2);
            font2.Append(fontFamilyNumbering2);
            font2.Append(fontScheme2);

            Font     font3     = new Font();
            Bold     bold1     = new Bold();
            FontSize fontSize3 = new FontSize()
            {
                Val = 30D
            };
            Color color3 = new Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName fontName3 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering3 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme3 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font3.Append(bold1);
            font3.Append(fontSize3);
            font3.Append(color3);
            font3.Append(fontName3);
            font3.Append(fontFamilyNumbering3);
            font3.Append(fontScheme3);

            fonts1.Append(font1);
            fonts1.Append(font2);
            fonts1.Append(font3);

            Fills fills1 = new Fills()
            {
                Count = (UInt32Value)2U
            };

            // 0 no BG color just normal Excel
            Fill        fill1        = new Fill();
            PatternFill patternFill1 = new PatternFill()
            {
                PatternType = PatternValues.None
            };

            fill1.Append(patternFill1);

            // 1 red or open CAT 1
            Fill        fill2        = new Fill();
            PatternFill patternFill2 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor2 = new ForegroundColor()
            {
                Rgb = "FFFF0000"
            };
            BackgroundColor backgroundColor2 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill2.Append(foregroundColor2);
            patternFill2.Append(backgroundColor2);
            fill2.Append(patternFill2);

            // 2 silver or N/A
            Fill        fill3        = new Fill();
            PatternFill patternFill3 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor3 = new ForegroundColor()
            {
                Rgb = "FFCCCCCC"
            };
            BackgroundColor backgroundColor3 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill3.Append(foregroundColor3);
            patternFill3.Append(backgroundColor3);
            fill3.Append(patternFill3);

            // 3 green or NaF
            Fill        fill4        = new Fill();
            PatternFill patternFill4 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor4 = new ForegroundColor()
            {
                Rgb = "FF50CC83"
            };
            BackgroundColor backgroundColor4 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill4.Append(foregroundColor4);
            patternFill4.Append(backgroundColor4);
            fill4.Append(patternFill4);

            // 4 black&white or Not Reviewed
            Fill        fill5        = new Fill();
            PatternFill patternFill5 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor5 = new ForegroundColor()
            {
                Rgb = "FFFFFFFF"
            };
            BackgroundColor backgroundColor5 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill5.Append(foregroundColor5);
            patternFill5.Append(backgroundColor5);
            fill5.Append(patternFill5);

            // 5 red or open CAT 1
            Fill        fill6        = new Fill();
            PatternFill patternFill6 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor6 = new ForegroundColor()
            {
                Rgb = "FFE53935"
            };
            BackgroundColor backgroundColor6 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill6.Append(foregroundColor6);
            patternFill6.Append(backgroundColor6);
            fill6.Append(patternFill6);

            // 6 orange open CAT 2
            Fill        fill7        = new Fill();
            PatternFill patternFill7 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor7 = new ForegroundColor()
            {
                Rgb = "FFFFA500"
            };
            BackgroundColor backgroundColor7 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill7.Append(foregroundColor7);
            patternFill7.Append(backgroundColor7);
            fill7.Append(patternFill7);

            // 7 orange open CAT 3
            Fill        fill8        = new Fill();
            PatternFill patternFill8 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor8 = new ForegroundColor()
            {
                Rgb = "FFD8D80E"
            };
            BackgroundColor backgroundColor8 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill8.Append(foregroundColor8);
            patternFill8.Append(backgroundColor8);
            fill8.Append(patternFill8);

            // 8 gray background for any general use
            Fill        fill9        = new Fill();
            PatternFill patternFill9 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor9 = new ForegroundColor()
            {
                Rgb = "FFBBBBBB"
            };
            BackgroundColor backgroundColor9 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill9.Append(foregroundColor9);
            patternFill9.Append(backgroundColor9);
            fill9.Append(patternFill9);

            fills1.Append(fill1); // these are 0 based when you include in the CellFormat statements below, so 1 off
            fills1.Append(fill2);
            fills1.Append(fill3);
            fills1.Append(fill4);
            fills1.Append(fill5);
            fills1.Append(fill6);
            fills1.Append(fill7);
            fills1.Append(fill8);
            fills1.Append(fill9);

            Borders borders1 = new Borders()
            {
                Count = (UInt32Value)1U
            };

            Border         border1         = new Border();
            LeftBorder     leftBorder1     = new LeftBorder();
            RightBorder    rightBorder1    = new RightBorder();
            TopBorder      topBorder1      = new TopBorder();
            BottomBorder   bottomBorder1   = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);
            borders1.Append(border1);

            CellStyleFormats cellStyleFormats1 = new CellStyleFormats()
            {
                Count = (UInt32Value)1U
            };
            CellFormat cellFormat1 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U
            };

            cellStyleFormats1.Append(cellFormat1);
            CellFormats cellFormats1 = new CellFormats()
            {
                Count = (UInt32Value)4U
            };

            // style index 0:  normal font and wrapping of text for cell rows
            CellFormat cellFormat2 = new CellFormat(new Alignment()
            {
                WrapText = true
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 1:  normal font with numerical format
            CellFormat cellFormat3 = new CellFormat(new Alignment()
            {
                WrapText = true
            })
            {
                NumberFormatId = (UInt32Value)2U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true
            };
            // style index 2:  title font of 30 bold
            CellFormat cellFormat4 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)2U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true
            };
            // style index 3:  info row under title and header rows font bold size 18
            CellFormat cellFormat5 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)1U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true
            };

            // fill colors based on the fillx variables above to match the 4 statuses of the checklist vulnerabilities
            // style index 4: red or Open
            CellFormat cellFormat6 = new CellFormat(new Alignment()
            {
                WrapText = true
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)5U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 5: silver or Not Applicable
            CellFormat cellFormat7 = new CellFormat(new Alignment()
            {
                WrapText = true
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 6: green or Not a Finding
            CellFormat cellFormat8 = new CellFormat(new Alignment()
            {
                WrapText = true
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 7: b/w or Not Reviewed
            CellFormat cellFormat9 = new CellFormat(new Alignment()
            {
                WrapText = true
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)4U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };

            // CENTER The content for listings versus the excel export of a checklist above
            // style index 8: red or Open centered content
            CellFormat cellFormat10 = new CellFormat(new Alignment()
            {
                WrapText = true, Horizontal = HorizontalAlignmentValues.Center
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)5U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 9: silver or Not Applicable
            CellFormat cellFormat11 = new CellFormat(new Alignment()
            {
                WrapText = true, Horizontal = HorizontalAlignmentValues.Center
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 10: green or Not a Finding
            CellFormat cellFormat12 = new CellFormat(new Alignment()
            {
                WrapText = true, Horizontal = HorizontalAlignmentValues.Center
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 11: b/w or Not Reviewed
            CellFormat cellFormat13 = new CellFormat(new Alignment()
            {
                WrapText = true, Horizontal = HorizontalAlignmentValues.Center
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)4U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };

            // style index 12: orange Open CAT 2
            CellFormat cellFormat14 = new CellFormat(new Alignment()
            {
                WrapText = true
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)6U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 13: yellow Open CAT 3
            CellFormat cellFormat15 = new CellFormat(new Alignment()
            {
                WrapText = true
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)7U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 14: orange Open CAT 2 centered
            CellFormat cellFormat16 = new CellFormat(new Alignment()
            {
                WrapText = true, Horizontal = HorizontalAlignmentValues.Center
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)6U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 15: yellow Open CAT 3 centered
            CellFormat cellFormat17 = new CellFormat(new Alignment()
            {
                WrapText = true, Horizontal = HorizontalAlignmentValues.Center
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)7U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            // style index 16: yellow Open CAT 3 centered
            CellFormat cellFormat18 = new CellFormat(new Alignment()
            {
                WrapText = true
            })
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)1U, FillId = (UInt32Value)8U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true
            };

            // add all these formats
            cellFormats1.Append(cellFormat2);
            cellFormats1.Append(cellFormat3);
            cellFormats1.Append(cellFormat4);
            cellFormats1.Append(cellFormat5);
            cellFormats1.Append(cellFormat6);
            cellFormats1.Append(cellFormat7);
            cellFormats1.Append(cellFormat8);
            cellFormats1.Append(cellFormat9);
            cellFormats1.Append(cellFormat10);
            cellFormats1.Append(cellFormat11);
            cellFormats1.Append(cellFormat12);
            cellFormats1.Append(cellFormat13);
            cellFormats1.Append(cellFormat14);
            cellFormats1.Append(cellFormat15);
            cellFormats1.Append(cellFormat16);
            cellFormats1.Append(cellFormat17);
            cellFormats1.Append(cellFormat18);

            CellStyles cellStyles1 = new CellStyles()
            {
                Count = (UInt32Value)1U
            };
            CellStyle cellStyle1 = new CellStyle()
            {
                Name = "Normal", FormatId = 0, BuiltinId = 0
            };

            cellStyles1.Append(cellStyle1);

            DifferentialFormats differentialFormats1 = new DifferentialFormats()
            {
                Count = 0
            };
            TableStyles tableStyles1 = new TableStyles()
            {
                Count = 0, DefaultTableStyle = "TableStyleMedium2", DefaultPivotStyle = "PivotStyleLight16"
            };

            StylesheetExtensionList stylesheetExtensionList1 = new StylesheetExtensionList();

            StylesheetExtension stylesheetExtension1 = new StylesheetExtension()
            {
                Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"
            };

            stylesheetExtension1.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");

            StylesheetExtension stylesheetExtension2 = new StylesheetExtension()
            {
                Uri = "{9260A510-F301-46a8-8635-F512D64BE5F5}"
            };

            stylesheetExtension2.AddNamespaceDeclaration("x15", "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main");

            stylesheetExtensionList1.Append(stylesheetExtension1);
            stylesheetExtensionList1.Append(stylesheetExtension2);

            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);
            stylesheet1.Append(tableStyles1);
            stylesheet1.Append(stylesheetExtensionList1);
            return(stylesheet1);
        }
コード例 #11
0
        private static Table CreateTable2(AuditDetailInfo item)
        {
            int    index     = 1;
            bool   IsVAT     = false;
            double VATNumber = 0;

            foreach (QuoteAuditInfo Quoteinfo in item.Quotes)
            {
                IsVAT     = Quoteinfo.IsVAT;
                VATNumber = Quoteinfo.VATNumber;
            }
            //prepare ITEMs
            List <string>         headers = new List <string>();
            List <List <string> > items   = new List <List <string> >();

            headers.Add("STT");
            headers.Add("Mặt hàng & dịch vụ");
            headers.Add("ĐVT");
            headers.Add("SL");
            headers.Add("Đơn giá");
            headers.Add("Thuế VAT " + VATNumber + "%");
            headers.Add("Đơn giá (Đã bao gồm thuế " + VATNumber + "% VAT )(VNĐ)");
            headers.Add("Thành tiền (VNĐ)");

            int[] widths = { 1000, 2700, 1300, 1300, 1300, 1300, 1300, 1300 };

            foreach (QuoteAuditInfo Quoteinfo in item.Quotes)
            {
                foreach (ItemInfo record in Quoteinfo.Items)
                {
                    double        VATcost = (record.ItemPrice * VATNumber) / 100;
                    List <string> row     = new List <string>();
                    row.Add(index.ToString());
                    row.Add(record.ItemName);
                    row.Add(record.ItemUnit);
                    row.Add(record.Amount.ToString());
                    row.Add(string.Format("{0:0,0}", record.ItemPrice).Replace(",", "."));
                    row.Add(string.Format("{0:0,0}", VATcost).Replace(",", "."));
                    row.Add(string.Format("{0:0,0}", (record.ItemPrice + VATcost)).Replace(",", "."));
                    row.Add(string.Format("{0:0,0}", ((record.ItemPrice + VATcost) * record.Amount)).Replace(",", "."));
                    items.Add(row);
                    index++;
                }
            }


            //// Create a new table
            Table tbl = new Table();

            //// Create the table properties
            TableProperties    tblProperties = new TableProperties();
            TableJustification just          = new TableJustification();

            just.Val = TableRowAlignmentValues.Center;
            //// Create Table Borders
            TableBorders tblBorders = new TableBorders();
            TopBorder    topBorder  = new TopBorder();

            topBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            topBorder.Color = "000000";
            tblBorders.AppendChild(topBorder);
            BottomBorder bottomBorder = new BottomBorder();

            bottomBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            bottomBorder.Color = "000000";
            tblBorders.AppendChild(bottomBorder);
            RightBorder rightBorder = new RightBorder();

            rightBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            rightBorder.Color = "000000";
            tblBorders.AppendChild(rightBorder);
            LeftBorder leftBorder = new LeftBorder();

            leftBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            leftBorder.Color = "000000";
            tblBorders.AppendChild(leftBorder);
            InsideHorizontalBorder insideHBorder = new InsideHorizontalBorder();

            insideHBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            insideHBorder.Color = "000000";
            tblBorders.AppendChild(insideHBorder);
            InsideVerticalBorder insideVBorder = new InsideVerticalBorder();

            insideVBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            insideVBorder.Color = "000000";
            tblBorders.AppendChild(insideVBorder);
            //// Add the table borders to the properties
            tblProperties.AppendChild(tblBorders);
            tblProperties.AppendChild(just);
            //// Add the table properties to the table
            tbl.AppendChild(tblProperties);
            //// Add a cell to each column in the row
            ///
            List <TableCell> headerCells = new List <TableCell>();
            TableCell        tcName1;

            foreach (string itemHeaders in headers)
            {
                tcName1 = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Right
                }), new Run(Bold(), new Text(itemHeaders))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "3000"
                }));
                headerCells.Add(tcName1);
            }
            //// Create a new row
            TableRow tr = new TableRow();

            tr.Append(headerCells.ToArray());
            tbl.AppendChild(tr);
            List <TableCell> dataCells = new List <TableCell>();

            foreach (List <string> rowItems in items)
            {
                dataCells = new List <TableCell>();
                foreach (string data in rowItems)
                {
                    tcName1 = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                    {
                        Val = JustificationValues.Right
                    }), new Run(Bold(), new Text(data))));
                    tcName1.Append(new TableCellProperties(
                                       new TableCellWidth()
                    {
                        Type = TableWidthUnitValues.Dxa, Width = "3000"
                    }));
                    dataCells.Add(tcName1);
                }
                TableRow tr1 = new TableRow();
                tr1.Append(dataCells.ToArray());
                tbl.AppendChild(tr1);
            }
            TableCellProperties cellOneProperties = new TableCellProperties();

            return(tbl);
        }
コード例 #12
0
        /// <summary>
        /// Appends a remark element at the end of the document.
        /// </summary>
        /// <param name="element">The remark to be written as an Element.</param>
        /// <param name="paragraph">The paragraph where this remark will be written.</param>
        private void AppendRemark(BasicContentBlock element, Paragraph paragraph)
        {
            // The following code was copy-pasted from the OpenXml SDK Productivity Tool, with some small changes.
            // It creates a 1 row, 2 columns table, appends the remark image in the first cell and the text in the second.
            // Then appends the whole table at the end of the document.
            // Because the image and the table have standatd dimensions, we can supply the various properties with absolute values where possible.
            RemarkContentBlock remark = (RemarkContentBlock)element;

            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();


            //                new TableBorders(
            //    new TopBorder() { Val = new EnumValue<BorderValues>(BorderValues.Dashed), Size = 24 },
            //    new BottomBorder() { Val = new EnumValue<BorderValues>(BorderValues.Dashed), Size = 24 },
            //    new LeftBorder() { Val = new EnumValue<BorderValues>(BorderValues.Dashed), Size = 24 },
            //    new RightBorder() { Val = new EnumValue<BorderValues>(BorderValues.Dashed), Size = 24 },
            //    new InsideHorizontalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Dashed), Size = 24 },
            //    new InsideVerticalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Dashed), Size = 24 }
            //));
            //    // Create a row.
            //    TableRow tr = new TableRow();

            //    // Create a cell.
            //    TableCell tc1 = new TableCell();

            //    // Specify the width property of the table cell.
            //    tc1.Append(new TableCellProperties(new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "2400" }));

            //    // Specify the table cell content.
            //    tc1.Append(new Paragraph(new Run(new Text(remark.Content))));

            //    // Append the table cell to the table row.
            //    tr.Append(tc1);


            TableStyle tableStyle1 = new TableStyle()
            {
                Val = "TableGrid"
            };
            TableWidth tableWidth1 = new TableWidth()
            {
                Width = "0", Type = TableWidthUnitValues.Auto
            };

            TableBorders         tableBorders1         = new TableBorders();
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder()
            {
                Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };

            tableBorders1.Append(insideVerticalBorder1);
            TableLook tableLook1 = new TableLook()
            {
                Val = "04A0", FirstRow = true, LastRow = true, FirstColumn = true, LastColumn = true, NoHorizontalBand = false, NoVerticalBand = true
            };

            Justification justification1 = new Justification()
            {
                Val = JustificationValues.Center
            };

            tableProperties1.Append(tableStyle1);
            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableLook1);
            tableProperties1.Append(justification1);

            TableGrid  tableGrid1  = new TableGrid();
            GridColumn gridColumn1 = new GridColumn()
            {
                Width = "846"
            };
            GridColumn gridColumn2 = new GridColumn()
            {
                Width = "8170"
            };

            tableGrid1.Append(gridColumn1);
            tableGrid1.Append(gridColumn2);

            TableRow tableRow1 = new TableRow()
            {
                RsidTableRowAddition = "00156C35", RsidTableRowProperties = "0092224D"
            };

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth      tableCellWidth1      = new TableCellWidth()
            {
                Width = "846", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders1 = new TableCellBorders();
            BottomBorder     bottomBorder1     = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder1 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            TopBorder topBorder1 = new TopBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };

            tableCellBorders1.Append(bottomBorder1);
            tableCellBorders1.Append(leftBorder1);
            tableCellBorders1.Append(topBorder1);

            tableCellProperties1.Append(tableCellWidth1);
            tableCellProperties1.Append(tableCellBorders1);

            Paragraph paragraph1 = new Paragraph()
            {
                RsidParagraphAddition = "00156C35", RsidParagraphProperties = "00156C35", RsidRunAdditionDefault = "00156C35"
            };

            Run run1 = new Run();

            RunProperties runProperties1 = new RunProperties();
            NoProof       noProof1       = new NoProof();

            runProperties1.Append(noProof1);

            ImagePart imagePart = Document.MainDocumentPart.AddImagePart(ImagePartType.Jpeg);

            using (FileStream fs = new FileStream(Path.Combine(imagesPath, remark.IconUrl), FileMode.Open))
            {
                imagePart.FeedData(fs);
            }

            run1.Append(runProperties1);
            Drawing drawing1 = AddImageToBody(Document.MainDocumentPart.GetIdOfPart(imagePart), 361604L, 361604L);

            run1.Append(drawing1);

            paragraph1.Append(run1);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph1);

            TableCell tableCell2 = new TableCell();

            TableCellProperties tableCellProperties2 = new TableCellProperties();
            TableCellWidth      tableCellWidth2      = new TableCellWidth()
            {
                Width = "8170", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders2 = new TableCellBorders();
            BottomBorder     bottomBorder2     = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder2 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            TopBorder topBorder2 = new TopBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };

            tableCellProperties2.Append(tableCellWidth2);
            tableCellBorders2.Append(bottomBorder2);
            tableCellBorders2.Append(rightBorder2);
            tableCellBorders2.Append(topBorder2);
            tableCellProperties2.Append(tableCellBorders2);

            Paragraph paragraph2 = new Paragraph()
            {
                RsidParagraphAddition = "00156C35", RsidParagraphProperties = "00156C35", RsidRunAdditionDefault = "00156C35"
            };

            Run ContentRun = new Run();

            ContentRun.Append(new Word.Text(remark.Content));
            paragraph2.Append(ContentRun);

            //Run run2 = new Run();
            //Word.Text text1 = new Word.Text();
            //text1.Text = remark.Content;
            //run2.Append(text1);
            //paragraph2.Append(run2);

            tableCell2.Append(tableCellProperties2);
            tableCell2.Append(paragraph2);

            tableRow1.Append(tableCell1);
            tableRow1.Append(tableCell2);

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(tableRow1);

            Document.MainDocumentPart.Document.Body.Append(new Paragraph(new Run(table1)));
            Document.Save();
        }
コード例 #13
0
        // Creates an Stylesheet instance and adds its children.
        public Stylesheet GenerateStylesheet()
        {
            Stylesheet stylesheet1 = new Stylesheet() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "x14ac" } };
            stylesheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            stylesheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");

            Fonts fonts1 = new Fonts() { Count = (UInt32Value)1U };

            Font font1 = new Font();
            FontSize fontSize1 = new FontSize() { Val = 11D };
            FontName fontName1 = new FontName() { Val = "Calibri" };

            font1.Append(fontSize1);
            font1.Append(fontName1);

            fonts1.Append(font1);

            Fills fills1 = new Fills() { Count = (UInt32Value)2U };

            Fill fill1 = new Fill();
            PatternFill patternFill1 = new PatternFill() { PatternType = PatternValues.None };

            fill1.Append(patternFill1);

            Fill fill2 = new Fill();
            PatternFill patternFill2 = new PatternFill() { PatternType = PatternValues.Gray125 };

            fill2.Append(patternFill2);

            fills1.Append(fill1);
            fills1.Append(fill2);

            Borders borders1 = new Borders() { Count = (UInt32Value)1U };
            Border border1 = new Border();
            LeftBorder leftBorder1 = new LeftBorder();
            RightBorder rightBorder1 = new RightBorder();
            TopBorder topBorder1 = new TopBorder();
            BottomBorder bottomBorder1 = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);

            Border border2 = new Border();
            LeftBorder leftBorder2 = new LeftBorder() { Style = BorderStyleValues.Thin };
            Color color1 = new Color() { Indexed = (UInt32Value)64U };
            leftBorder2.Append(color1);
            RightBorder rightBorder2 = new RightBorder() { Style = BorderStyleValues.Thin };
            Color color2 = new Color() { Indexed = (UInt32Value)64U };
            rightBorder2.Append(color2);
            TopBorder topBorder2 = new TopBorder() { Style = BorderStyleValues.Thin };
            Color color3 = new Color() { Indexed = (UInt32Value)64U };
            topBorder2.Append(color3);
            BottomBorder bottomBorder2 = new BottomBorder() { Style = BorderStyleValues.Thin };
            Color color4 = new Color() { Indexed = (UInt32Value)64U };
            bottomBorder2.Append(color4);
            DiagonalBorder diagonalBorder2 = new DiagonalBorder() { Style = BorderStyleValues.Thin };
            Color color5 = new Color() { Indexed = (UInt32Value)64U };
            diagonalBorder2.Append(color5);

            border2.Append(leftBorder2);
            border2.Append(rightBorder2);
            border2.Append(topBorder2);
            border2.Append(bottomBorder2);
            border2.Append(diagonalBorder2);

            borders1.Append(border1);
            borders1.Append(border2);

            CellStyleFormats cellStyleFormats1 = new CellStyleFormats() { Count = (UInt32Value)1U };
            CellFormat cellFormat1 = new CellFormat() { NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U };

            cellStyleFormats1.Append(cellFormat1);

            CellFormats cellFormats1 = new CellFormats() { Count = (UInt32Value)1U };
            CellFormat cellFormat2 = new CellFormat() { NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U };

            cellFormats1.Append(cellFormat2);

            CellStyles cellStyles1 = new CellStyles() { Count = (UInt32Value)1U };
            CellStyle cellStyle1 = new CellStyle() { Name = "Normal", FormatId = (UInt32Value)0U, BuiltinId = (UInt32Value)0U };

            cellStyles1.Append(cellStyle1);
            DifferentialFormats differentialFormats1 = new DifferentialFormats() { Count = (UInt32Value)0U };
            TableStyles tableStyles1 = new TableStyles() { Count = (UInt32Value)0U, DefaultTableStyle = "TableStyleMedium2", DefaultPivotStyle = "PivotStyleLight16" };

            StylesheetExtensionList stylesheetExtensionList1 = new StylesheetExtensionList();

            StylesheetExtension stylesheetExtension1 = new StylesheetExtension() { Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" };
            stylesheetExtension1.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            DocumentFormat.OpenXml.Office2010.Excel.SlicerStyles slicerStyles1 = new DocumentFormat.OpenXml.Office2010.Excel.SlicerStyles() { DefaultSlicerStyle = "SlicerStyleLight1" };

            stylesheetExtension1.Append(slicerStyles1);

            stylesheetExtensionList1.Append(stylesheetExtension1);

            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);
            stylesheet1.Append(tableStyles1);
            stylesheet1.Append(stylesheetExtensionList1);
            return stylesheet1;
        }
コード例 #14
0
        // Creates an Stylesheet instance and adds its children.
        public static Stylesheet GenerateStylesheet()
        {
            var stylesheet1 = new Stylesheet {MCAttributes = new MarkupCompatibilityAttributes {Ignorable = "x14ac"}};
            stylesheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            stylesheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");

            var fonts1 = new Fonts {Count = 7U, KnownFonts = true};

            var font1 = new Font();
            var fontSize1 = new FontSize {Val = 11D};
            var color1 = new Color {Theme = 1U};
            var fontName1 = new FontName {Val = "Calibri"};
            var fontFamilyNumbering1 = new FontFamilyNumbering {Val = 2};
            var fontCharSet1 = new FontCharSet {Val = 204};
            var fontScheme1 = new FontScheme {Val = FontSchemeValues.Minor};

            font1.Append(fontSize1);
            font1.Append(color1);
            font1.Append(fontName1);
            font1.Append(fontFamilyNumbering1);
            font1.Append(fontCharSet1);
            font1.Append(fontScheme1);

            var font2 = new Font();
            var bold1 = new Bold();
            var fontSize2 = new FontSize {Val = 11D};
            var color2 = new Color {Theme = 1U};
            var fontName2 = new FontName {Val = "Calibri"};
            var fontFamilyNumbering2 = new FontFamilyNumbering {Val = 2};
            var fontCharSet2 = new FontCharSet {Val = 204};
            var fontScheme2 = new FontScheme {Val = FontSchemeValues.Minor};

            font2.Append(bold1);
            font2.Append(fontSize2);
            font2.Append(color2);
            font2.Append(fontName2);
            font2.Append(fontFamilyNumbering2);
            font2.Append(fontCharSet2);
            font2.Append(fontScheme2);

            var font3 = new Font();
            var bold2 = new Bold();
            var italic1 = new Italic();
            var fontSize3 = new FontSize {Val = 11D};
            var color3 = new Color {Theme = 1U};
            var fontName3 = new FontName {Val = "Calibri"};
            var fontFamilyNumbering3 = new FontFamilyNumbering {Val = 2};
            var fontCharSet3 = new FontCharSet {Val = 204};
            var fontScheme3 = new FontScheme {Val = FontSchemeValues.Minor};

            font3.Append(bold2);
            font3.Append(italic1);
            font3.Append(fontSize3);
            font3.Append(color3);
            font3.Append(fontName3);
            font3.Append(fontFamilyNumbering3);
            font3.Append(fontCharSet3);
            font3.Append(fontScheme3);

            var font4 = new Font();
            var bold3 = new Bold();
            var fontSize4 = new FontSize {Val = 18D};
            var color4 = new Color {Theme = 1U};
            var fontName4 = new FontName {Val = "Calibri"};
            var fontFamilyNumbering4 = new FontFamilyNumbering {Val = 2};
            var fontCharSet4 = new FontCharSet {Val = 204};
            var fontScheme4 = new FontScheme {Val = FontSchemeValues.Minor};

            font4.Append(bold3);
            font4.Append(fontSize4);
            font4.Append(color4);
            font4.Append(fontName4);
            font4.Append(fontFamilyNumbering4);
            font4.Append(fontCharSet4);
            font4.Append(fontScheme4);

            var font5 = new Font();
            var bold4 = new Bold();
            var fontSize5 = new FontSize {Val = 11D};
            var fontName5 = new FontName {Val = "Calibri"};
            var fontFamilyNumbering5 = new FontFamilyNumbering {Val = 2};
            var fontCharSet5 = new FontCharSet {Val = 204};
            var fontScheme5 = new FontScheme {Val = FontSchemeValues.Minor};

            font5.Append(bold4);
            font5.Append(fontSize5);
            font5.Append(fontName5);
            font5.Append(fontFamilyNumbering5);
            font5.Append(fontCharSet5);
            font5.Append(fontScheme5);

            var font6 = new Font();
            var fontSize6 = new FontSize {Val = 11D};
            var fontName6 = new FontName {Val = "Calibri"};
            var fontFamilyNumbering6 = new FontFamilyNumbering {Val = 2};
            var fontCharSet6 = new FontCharSet {Val = 204};
            var fontScheme6 = new FontScheme {Val = FontSchemeValues.Minor};

            font6.Append(fontSize6);
            font6.Append(fontName6);
            font6.Append(fontFamilyNumbering6);
            font6.Append(fontCharSet6);
            font6.Append(fontScheme6);

            var font7 = new Font();
            var bold5 = new Bold();
            var fontSize7 = new FontSize {Val = 12D};
            var color5 = new Color {Theme = 1U};
            var fontName7 = new FontName {Val = "Calibri"};
            var fontFamilyNumbering7 = new FontFamilyNumbering {Val = 2};
            var fontCharSet7 = new FontCharSet {Val = 204};
            var fontScheme7 = new FontScheme {Val = FontSchemeValues.Minor};

            font7.Append(bold5);
            font7.Append(fontSize7);
            font7.Append(color5);
            font7.Append(fontName7);
            font7.Append(fontFamilyNumbering7);
            font7.Append(fontCharSet7);
            font7.Append(fontScheme7);

            fonts1.Append(font1);
            fonts1.Append(font2);
            fonts1.Append(font3);
            fonts1.Append(font4);
            fonts1.Append(font5);
            fonts1.Append(font6);
            fonts1.Append(font7);

            var fills1 = new Fills {Count = 2U};

            var fill1 = new Fill();
            var patternFill1 = new PatternFill {PatternType = PatternValues.None};

            fill1.Append(patternFill1);

            var fill2 = new Fill();
            var patternFill2 = new PatternFill {PatternType = PatternValues.Gray125};

            fill2.Append(patternFill2);

            fills1.Append(fill1);
            fills1.Append(fill2);

            var borders1 = new Borders {Count = 2U};

            var border1 = new Border();
            var leftBorder1 = new LeftBorder();
            var rightBorder1 = new RightBorder();
            var topBorder1 = new TopBorder();
            var bottomBorder1 = new BottomBorder();
            var diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);

            var border2 = new Border();

            var leftBorder2 = new LeftBorder {Style = BorderStyleValues.Thin};
            var color6 = new Color {Indexed = 64U};

            leftBorder2.Append(color6);

            var rightBorder2 = new RightBorder {Style = BorderStyleValues.Thin};
            var color7 = new Color {Indexed = 64U};

            rightBorder2.Append(color7);

            var topBorder2 = new TopBorder {Style = BorderStyleValues.Thin};
            var color8 = new Color {Indexed = 64U};

            topBorder2.Append(color8);

            var bottomBorder2 = new BottomBorder {Style = BorderStyleValues.Thin};
            var color9 = new Color {Indexed = 64U};

            bottomBorder2.Append(color9);
            var diagonalBorder2 = new DiagonalBorder();

            border2.Append(leftBorder2);
            border2.Append(rightBorder2);
            border2.Append(topBorder2);
            border2.Append(bottomBorder2);
            border2.Append(diagonalBorder2);

            borders1.Append(border1);
            borders1.Append(border2);

            var cellStyleFormats1 = new CellStyleFormats {Count = 4U};
            var cellFormat1 = new CellFormat {NumberFormatId = 0U, FontId = 0U, FillId = 0U, BorderId = 0U};
            var cellFormat2 = new CellFormat
                {
                    NumberFormatId = 0U,
                    FontId = 5U,
                    FillId = 0U,
                    BorderId = 1U,
                    ApplyNumberFormat = false,
                    ApplyAlignment = false,
                    ApplyProtection = false
                };
            var cellFormat3 = new CellFormat
                {
                    NumberFormatId = 0U,
                    FontId = 4U,
                    FillId = 0U,
                    BorderId = 1U,
                    ApplyNumberFormat = false,
                    ApplyAlignment = false,
                    ApplyProtection = false
                };
            var cellFormat4 = new CellFormat {NumberFormatId = 0U, FontId = 6U, FillId = 0U, BorderId = 1U};

            cellStyleFormats1.Append(cellFormat1);
            cellStyleFormats1.Append(cellFormat2);
            cellStyleFormats1.Append(cellFormat3);
            cellStyleFormats1.Append(cellFormat4);

            var cellFormats1 = new CellFormats {Count = 5U};
            var cellFormat5 = new CellFormat
                {
                    NumberFormatId = 0U,
                    FontId = 0U,
                    FillId = 0U,
                    BorderId = 0U,
                    FormatId = 0U
                };
            var cellFormat6 = new CellFormat
                {
                    NumberFormatId = 0U,
                    FontId = 1U,
                    FillId = 0U,
                    BorderId = 0U,
                    FormatId = 0U,
                    ApplyFont = true
                };
            var cellFormat7 = new CellFormat
                {
                    NumberFormatId = 0U,
                    FontId = 2U,
                    FillId = 0U,
                    BorderId = 0U,
                    FormatId = 0U,
                    ApplyFont = true,
                    ApplyBorder = true
                };
            var cellFormat8 = new CellFormat
                {
                    NumberFormatId = 0U,
                    FontId = 0U,
                    FillId = 0U,
                    BorderId = 0U,
                    FormatId = 0U,
                    ApplyAlignment = true
                };

            var cellFormat9 = new CellFormat
                {
                    NumberFormatId = 0U,
                    FontId = 3U,
                    FillId = 0U,
                    BorderId = 0U,
                    FormatId = 0U,
                    ApplyFont = true,
                    ApplyAlignment = true
                };
            var alignment1 = new Alignment {Horizontal = HorizontalAlignmentValues.Center};

            cellFormat9.Append(alignment1);

            cellFormats1.Append(cellFormat5);
            cellFormats1.Append(cellFormat6);
            cellFormats1.Append(cellFormat7);
            cellFormats1.Append(cellFormat8);
            cellFormats1.Append(cellFormat9);

            var cellStyles1 = new CellStyles {Count = 4U};
            var cellStyle1 = new CellStyle {Name = "Custom", FormatId = 3U};
            var cellStyle2 = new CellStyle {Name = "Нейтральный", FormatId = 2U, BuiltinId = 28U, CustomBuiltin = true};
            var cellStyle3 = new CellStyle {Name = "Обычный", FormatId = 0U, BuiltinId = 0U};
            var cellStyle4 = new CellStyle {Name = "Плохой", FormatId = 1U, BuiltinId = 27U, CustomBuiltin = true};

            cellStyles1.Append(cellStyle1);
            cellStyles1.Append(cellStyle2);
            cellStyles1.Append(cellStyle3);
            cellStyles1.Append(cellStyle4);
            var differentialFormats1 = new DifferentialFormats {Count = 0U};
            var tableStyles1 = new TableStyles
                {
                    Count = 0U,
                    DefaultTableStyle = "TableStyleMedium2",
                    DefaultPivotStyle = "PivotStyleLight16"
                };

            var stylesheetExtensionList1 = new StylesheetExtensionList();

            var stylesheetExtension1 = new StylesheetExtension {Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"};
            stylesheetExtension1.AddNamespaceDeclaration("x14",
                                                         "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            var slicerStyles1 = new X14.SlicerStyles {DefaultSlicerStyle = "SlicerStyleLight1"};

            stylesheetExtension1.Append(slicerStyles1);

            stylesheetExtensionList1.Append(stylesheetExtension1);

            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);
            stylesheet1.Append(tableStyles1);
            stylesheet1.Append(stylesheetExtensionList1);
            return stylesheet1;
        }
コード例 #15
0
ファイル: OwnerVerification.cs プロジェクト: plitton/hets
        private static TableCell SetupCell(string text, bool center = false)
        {
            try
            {
                TableCell tableCell = new TableCell();

                TableCellProperties tableCellProperties = new TableCellProperties();

                // border & padding
                TableCellBorders borders = new TableCellBorders();

                TopBorder topBorder = new TopBorder {
                    Val = new EnumValue <BorderValues>(BorderValues.Thick), Color = "A1A2A3"
                };
                borders.AppendChild(topBorder);

                BottomBorder bottomBorder = new BottomBorder {
                    Val = new EnumValue <BorderValues>(BorderValues.Thick), Color = "A1A2A3"
                };
                borders.AppendChild(bottomBorder);

                RightBorder rightBorder = new RightBorder {
                    Val = new EnumValue <BorderValues>(BorderValues.Nil)
                };
                borders.AppendChild(rightBorder);

                LeftBorder leftBorder = new LeftBorder {
                    Val = new EnumValue <BorderValues>(BorderValues.Nil)
                };
                borders.AppendChild(leftBorder);

                TableCellMargin margin    = new TableCellMargin();
                TopMargin       topMargin = new TopMargin()
                {
                    Width = "40"
                };
                BottomMargin bottomMargin = new BottomMargin()
                {
                    Width = "40"
                };
                margin.AppendChild(topMargin);
                margin.AppendChild(bottomMargin);

                tableCellProperties.AppendChild(borders);
                tableCellProperties.AppendChild(margin);

                tableCell.AppendChild(tableCellProperties);

                // add text (with specific formatting)
                Paragraph paragraph = new Paragraph()
                {
                    RsidParagraphAddition = "00607D74", RsidRunAdditionDefault = "00607D74", ParagraphId = "6ED85602", TextId = "77777777"
                };

                ParagraphProperties        paragraphProperties        = new ParagraphProperties();
                ParagraphMarkRunProperties paragraphMarkRunProperties = new ParagraphMarkRunProperties();

                paragraphMarkRunProperties.AppendChild(new Color {
                    Val = "000000"
                });
                paragraphMarkRunProperties.AppendChild(new RunFonts {
                    Ascii = "Arial"
                });
                paragraphMarkRunProperties.AppendChild(new FontSize()
                {
                    Val = "7pt"
                });

                Justification justification = new Justification()
                {
                    Val = JustificationValues.Left
                };
                if (center)
                {
                    justification.Val = JustificationValues.Center;
                }

                paragraphProperties.AppendChild(paragraphMarkRunProperties);
                paragraphProperties.AppendChild(justification);
                paragraph.AppendChild(paragraphProperties);

                paragraph.AppendChild(new Text(text));

                // add to table cell
                tableCell.AppendChild(paragraph);

                return(tableCell);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
コード例 #16
0
ファイル: SaveToExcel.cs プロジェクト: Shpula/KursWork
        private static void CreateStyles(WorkbookPart workbookpart)
        {
            WorkbookStylesPart sp = workbookpart.AddNewPart <WorkbookStylesPart>();

            sp.Stylesheet = new Stylesheet();
            Fonts fonts = new Fonts()
            {
                Count = (UInt32Value)2U, KnownFonts = true
            };
            Font fontUsual = new Font();

            fontUsual.Append(new FontSize()
            {
                Val = 12D
            });
            fontUsual.Append(new DocumentFormat.OpenXml.Office2010.Excel.Color()
            {
                Theme = (UInt32Value)1U
            });
            fontUsual.Append(new FontName()
            {
                Val = "Times New Roman"
            });
            fontUsual.Append(new FontFamilyNumbering()
            {
                Val = 2
            });
            fontUsual.Append(new FontScheme()
            {
                Val = FontSchemeValues.Minor
            });
            Font fontTitle = new Font();

            fontTitle.Append(new Bold());
            fontTitle.Append(new FontSize()
            {
                Val = 14D
            });
            fontTitle.Append(new DocumentFormat.OpenXml.Office2010.Excel.Color()
            {
                Theme = (UInt32Value)1U
            });
            fontTitle.Append(new FontName()
            {
                Val = "Times New Roman"
            });
            fontTitle.Append(new FontFamilyNumbering()
            {
                Val = 2
            });
            fontTitle.Append(new FontScheme()
            {
                Val = FontSchemeValues.Minor
            });
            fonts.Append(fontUsual);
            fonts.Append(fontTitle);
            Fills fills = new Fills()
            {
                Count = (UInt32Value)2U
            };
            Fill fill1 = new Fill();

            fill1.Append(new PatternFill()
            {
                PatternType = PatternValues.None
            });
            Fill fill2 = new Fill();

            fill2.Append(new PatternFill()
            {
                PatternType = PatternValues.Gray125
            });
            fills.Append(fill1);
            fills.Append(fill2);
            Borders borders = new Borders()
            {
                Count = (UInt32Value)2U
            };
            Border borderNoBorder = new Border();

            borderNoBorder.Append(new LeftBorder());
            borderNoBorder.Append(new RightBorder());
            borderNoBorder.Append(new TopBorder());
            borderNoBorder.Append(new BottomBorder());
            borderNoBorder.Append(new DiagonalBorder());
            Border     borderThin = new Border();
            LeftBorder leftBorder = new LeftBorder()
            {
                Style = BorderStyleValues.Thin
            };

            leftBorder.Append(new DocumentFormat.OpenXml.Office2010.Excel.Color()
            {
                Indexed = (UInt32Value)64U
            });
            RightBorder rightBorder = new RightBorder()
            {
                Style = BorderStyleValues.Thin
            };

            rightBorder.Append(new DocumentFormat.OpenXml.Office2010.Excel.Color()
            {
                Indexed = (UInt32Value)64U
            });
            TopBorder topBorder = new TopBorder()
            {
                Style = BorderStyleValues.Thin
            };

            topBorder.Append(new DocumentFormat.OpenXml.Office2010.Excel.Color()
            {
                Indexed = (UInt32Value)64U
            });
            BottomBorder bottomBorder = new BottomBorder()
            {
                Style = BorderStyleValues.Thin
            };

            bottomBorder.Append(new DocumentFormat.OpenXml.Office2010.Excel.Color()
            {
                Indexed = (UInt32Value)64U
            });
            borderThin.Append(leftBorder);
            borderThin.Append(rightBorder);
            borderThin.Append(topBorder);
            borderThin.Append(bottomBorder);
            borderThin.Append(new DiagonalBorder());
            borders.Append(borderNoBorder);
            borders.Append(borderThin);
            CellStyleFormats cellStyleFormats = new CellStyleFormats()
            {
                Count = (UInt32Value)1U
            };
            CellFormat cellFormatStyle = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U,
                FontId         = (UInt32Value)0U,
                FillId         = (UInt32Value)0U,
                BorderId       = (UInt32Value)0U
            };

            cellStyleFormats.Append(cellFormatStyle);
            CellFormats cellFormats = new CellFormats()
            {
                Count = (UInt32Value)3U
            };
            CellFormat cellFormatFont = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U,
                FontId         = (UInt32Value)0U,
                FillId         = (UInt32Value)0U,
                BorderId       = (UInt32Value)0U,
                FormatId       = (UInt32Value)0U,
                ApplyFont      = true
            };
            CellFormat cellFormatFontAndBorder = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U,
                FontId         = (UInt32Value)0U,
                FillId         = (UInt32Value)0U,
                BorderId       = (UInt32Value)1U,
                FormatId       = (UInt32Value)0U,
                ApplyFont      = true,
                ApplyBorder    = true
            };
            CellFormat cellFormatTitle = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U,
                FontId         = (UInt32Value)1U,
                FillId         = (UInt32Value)0U,
                BorderId       = (UInt32Value)0U,
                FormatId       = (UInt32Value)0U,
                Alignment      = new Alignment()
                {
                    Vertical   = VerticalAlignmentValues.Center,
                    WrapText   = true,
                    Horizontal = HorizontalAlignmentValues.Center
                },
                ApplyFont = true
            };

            cellFormats.Append(cellFormatFont);
            cellFormats.Append(cellFormatFontAndBorder);
            cellFormats.Append(cellFormatTitle);
            CellStyles cellStyles = new CellStyles()
            {
                Count = (UInt32Value)1U
            };

            cellStyles.Append(new CellStyle()
            {
                Name      = "Normal",
                FormatId  = (UInt32Value)0U,
                BuiltinId = (UInt32Value)0U
            });
            DocumentFormat.OpenXml.Office2013.Excel.DifferentialFormats
                differentialFormats = new DocumentFormat.OpenXml.Office2013.Excel.DifferentialFormats()
            {
                Count = (UInt32Value)0U
            };
            TableStyles tableStyles = new TableStyles()
            {
                Count             = (UInt32Value)0U,
                DefaultTableStyle = "TableStyleMedium2",
                DefaultPivotStyle = "PivotStyleLight16"
            };
            StylesheetExtensionList stylesheetExtensionList = new StylesheetExtensionList();
            StylesheetExtension     stylesheetExtension1    = new StylesheetExtension()
            {
                Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"
            };

            stylesheetExtension1.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            stylesheetExtension1.Append(new SlicerStyles()
            {
                DefaultSlicerStyle = "SlicerStyleLight1"
            });
            StylesheetExtension stylesheetExtension2 = new StylesheetExtension()
            {
                Uri = "{9260A510-F301-46a8-8635-F512D64BE5F5}"
            };

            stylesheetExtension2.AddNamespaceDeclaration("x15", "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main");
            stylesheetExtension2.Append(new TimelineStyles()
            {
                DefaultTimelineStyle = "TimeSlicerStyleLight1"
            });
            stylesheetExtensionList.Append(stylesheetExtension1);
            stylesheetExtensionList.Append(stylesheetExtension2);
            sp.Stylesheet.Append(fonts);
            sp.Stylesheet.Append(fills);
            sp.Stylesheet.Append(borders);
            sp.Stylesheet.Append(cellStyleFormats);
            sp.Stylesheet.Append(cellFormats);
            sp.Stylesheet.Append(cellStyles);
            sp.Stylesheet.Append(differentialFormats);
            sp.Stylesheet.Append(tableStyles);
            sp.Stylesheet.Append(stylesheetExtensionList);
        }
コード例 #17
0
ファイル: WordDecision.cs プロジェクト: yeupanhmaj/TMHH
        private static Table CreateTable(DecisionInfo item, double Totalcost)
        {
            //prepare ITEMs
            List <string>         headers = new List <string>();
            List <List <string> > items   = new List <List <string> >();

            headers.Add("STT");
            headers.Add("Tên và mô tả thiết bị");
            headers.Add("Đơn vị tính");
            headers.Add("Số lượng");

            headers.Add("Đơn giá(VNĐ)");
            headers.Add("Thành tiền (VNĐ)");

            int[] widths = { 1000, 3000, 1600, 1600, 1600, 2100 };


            int index = 1;

            foreach (ItemInfo record in item.Items)
            {
                List <string> row = new List <string>();
                row.Add(index.ToString());
                row.Add(record.ItemName);
                row.Add(record.ItemUnit);
                row.Add(record.Amount.ToString());
                row.Add(string.Format("{0:0,0}", record.ItemPrice).Replace(",", "."));
                row.Add(string.Format("{0:0,0}", record.ItemPrice * record.Amount).Replace(",", "."));
                items.Add(row);
                index++;
            }



            //// Create a new table
            Table tbl = new Table();

            //// Create the table properties
            TableProperties    tblProperties = new TableProperties();
            TableJustification just          = new TableJustification();

            just.Val = TableRowAlignmentValues.Center;
            //// Create Table Borders
            TableBorders tblBorders = new TableBorders();
            TopBorder    topBorder  = new TopBorder();

            topBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            topBorder.Color = "000000";
            tblBorders.AppendChild(topBorder);
            BottomBorder bottomBorder = new BottomBorder();

            bottomBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            bottomBorder.Color = "000000";
            tblBorders.AppendChild(bottomBorder);
            RightBorder rightBorder = new RightBorder();

            rightBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            rightBorder.Color = "000000";
            tblBorders.AppendChild(rightBorder);
            LeftBorder leftBorder = new LeftBorder();

            leftBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            leftBorder.Color = "000000";
            tblBorders.AppendChild(leftBorder);
            InsideHorizontalBorder insideHBorder = new InsideHorizontalBorder();

            insideHBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            insideHBorder.Color = "000000";
            tblBorders.AppendChild(insideHBorder);
            InsideVerticalBorder insideVBorder = new InsideVerticalBorder();

            insideVBorder.Val   = new EnumValue <BorderValues>(BorderValues.Thick);
            insideVBorder.Color = "000000";
            tblBorders.AppendChild(insideVBorder);
            //// Add the table borders to the properties
            tblProperties.AppendChild(tblBorders);
            tblProperties.AppendChild(just);
            //// Add the table properties to the table
            tbl.AppendChild(tblProperties);
            //// Add a cell to each column in the row
            ///
            List <TableCell> headerCells = new List <TableCell>();
            TableCell        tcName1;

            foreach (string itemHeaders in headers)
            {
                tcName1 = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Center
                }), new Run(Bold(), new Text(itemHeaders))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "3000"
                }));
                headerCells.Add(tcName1);
            }
            //// Create a new row
            TableRow tr = new TableRow();

            tr.Append(headerCells.ToArray());
            tbl.AppendChild(tr);
            List <TableCell> dataCells = new List <TableCell>();

            foreach (List <string> rowItems in items)
            {
                dataCells = new List <TableCell>();
                foreach (string data in rowItems)
                {
                    tcName1 = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                    {
                        Val = JustificationValues.Center
                    }), new Run(Bold(), new Text(data))));
                    tcName1.Append(new TableCellProperties(
                                       new TableCellWidth()
                    {
                        Type = TableWidthUnitValues.Dxa, Width = "3000"
                    }));
                    dataCells.Add(tcName1);
                }
                TableRow tr1 = new TableRow();
                tr1.Append(dataCells.ToArray());
                tbl.AppendChild(tr1);
            }
            TableCellProperties cellOneProperties = new TableCellProperties();

            //if VAT
            if (item.IsVAT)
            {
                // total row
                tr        = new TableRow();
                dataCells = new List <TableCell>();
                tcName1   = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Right
                }), new Run(new Text("Tổng công (chưa bao gồm VAT)"))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "1000"
                }));
                cellOneProperties = new TableCellProperties();
                cellOneProperties.Append(new HorizontalMerge()
                {
                    Val = MergedCellValues.Restart
                });
                tcName1.Append(cellOneProperties);
                dataCells.Add(tcName1);

                for (int loopindex = 1; loopindex < widths.Length - 1; loopindex++)
                {
                    tcName1 = new TableCell(new Paragraph());
                    tcName1.Append(new TableCellProperties(
                                       new TableCellWidth()
                    {
                        Type = TableWidthUnitValues.Dxa, Width = widths[loopindex].ToString()
                    }));
                    cellOneProperties = new TableCellProperties();
                    cellOneProperties.Append(new HorizontalMerge()
                    {
                        Val = MergedCellValues.Continue
                    });
                    tcName1.Append(cellOneProperties);
                    dataCells.Add(tcName1);
                }
                double totalCostWithoutVAT = 0;
                totalCostWithoutVAT = Totalcost / ((item.VATNumber + 100) / 100);
                var totalCostWithoutVATstr = string.Format("{0:0,0}", totalCostWithoutVAT).Replace(",", ".");
                tcName1 = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Right
                }), new Run(new Text(totalCostWithoutVATstr))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "1900"
                }));
                cellOneProperties = new TableCellProperties();
                cellOneProperties.Append(new HorizontalMerge()
                {
                    Val = MergedCellValues.Restart
                });
                tcName1.Append(cellOneProperties);
                dataCells.Add(tcName1);
                tr.Append(dataCells.ToArray());
                tbl.AppendChild(tr);



                // total row
                tr        = new TableRow();
                dataCells = new List <TableCell>();
                tcName1   = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Right
                }), new Run(new Text("Thuế VAT " + item.VATNumber.ToString() + "%"))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "200"
                }));
                cellOneProperties = new TableCellProperties();
                cellOneProperties.Append(new HorizontalMerge()
                {
                    Val = MergedCellValues.Restart
                });
                tcName1.Append(cellOneProperties);
                dataCells.Add(tcName1);

                for (int loopindex = 1; loopindex < widths.Length - 1; loopindex++)
                {
                    tcName1 = new TableCell(new Paragraph());
                    tcName1.Append(new TableCellProperties(
                                       new TableCellWidth()
                    {
                        Type = TableWidthUnitValues.Dxa, Width = widths[loopindex].ToString()
                    }));
                    cellOneProperties = new TableCellProperties();
                    cellOneProperties.Append(new HorizontalMerge()
                    {
                        Val = MergedCellValues.Continue
                    });
                    tcName1.Append(cellOneProperties);
                    dataCells.Add(tcName1);
                }
                double vatCost = 0;
                vatCost = (Totalcost * item.VATNumber) / 100;
                var vatCoststr = string.Format("{0:0,0}", vatCost).Replace(",", ".");
                tcName1 = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Right
                }), new Run(new Text(vatCoststr))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "1900"
                }));
                cellOneProperties = new TableCellProperties();
                cellOneProperties.Append(new HorizontalMerge()
                {
                    Val = MergedCellValues.Restart
                });
                tcName1.Append(cellOneProperties);
                dataCells.Add(tcName1);

                tr.Append(dataCells.ToArray());
                tbl.AppendChild(tr);

                // total row
                tr        = new TableRow();
                dataCells = new List <TableCell>();
                tcName1   = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Right
                }), new Run(new Text("TỔNG CỘNG (đã bao gồm VAT)"))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "200"
                }));
                cellOneProperties = new TableCellProperties();
                cellOneProperties.Append(new HorizontalMerge()
                {
                    Val = MergedCellValues.Restart
                });
                tcName1.Append(cellOneProperties);
                dataCells.Add(tcName1);

                for (int loopindex = 1; loopindex < widths.Length - 1; loopindex++)
                {
                    tcName1 = new TableCell(new Paragraph());
                    tcName1.Append(new TableCellProperties(
                                       new TableCellWidth()
                    {
                        Type = TableWidthUnitValues.Dxa, Width = widths[loopindex].ToString()
                    }));
                    cellOneProperties = new TableCellProperties();
                    cellOneProperties.Append(new HorizontalMerge()
                    {
                        Val = MergedCellValues.Continue
                    });
                    tcName1.Append(cellOneProperties);
                    dataCells.Add(tcName1);
                }

                var TotalCost = string.Format("{0:0,0}", Totalcost).Replace(",", ".");
                tcName1 = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Right
                }), new Run(new Text(TotalCost))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "1900"
                }));
                cellOneProperties = new TableCellProperties();
                cellOneProperties.Append(new HorizontalMerge()
                {
                    Val = MergedCellValues.Restart
                });
                tcName1.Append(cellOneProperties);
                dataCells.Add(tcName1);

                tr.Append(dataCells.ToArray());
                tbl.AppendChild(tr);
            }
            else
            {
                // total row
                tr        = new TableRow();
                dataCells = new List <TableCell>();
                tcName1   = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Right
                }), new Run(new Text("TỔNG CỘNG "))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "200"
                }));
                cellOneProperties = new TableCellProperties();
                cellOneProperties.Append(new HorizontalMerge()
                {
                    Val = MergedCellValues.Restart
                });
                tcName1.Append(cellOneProperties);
                dataCells.Add(tcName1);

                for (int loopindex = 1; loopindex < widths.Length - 1; loopindex++)
                {
                    tcName1 = new TableCell(new Paragraph());
                    tcName1.Append(new TableCellProperties(
                                       new TableCellWidth()
                    {
                        Type = TableWidthUnitValues.Dxa, Width = widths[loopindex].ToString()
                    }));
                    cellOneProperties = new TableCellProperties();
                    cellOneProperties.Append(new HorizontalMerge()
                    {
                        Val = MergedCellValues.Continue
                    });
                    tcName1.Append(cellOneProperties);
                    dataCells.Add(tcName1);
                }

                var TotalCost = string.Format("{0:0,0}", Totalcost).Replace(",", ".");
                tcName1 = new TableCell(new Paragraph(new ParagraphProperties(new Justification()
                {
                    Val = JustificationValues.Right
                }), new Run(new Text(TotalCost))));
                tcName1.Append(new TableCellProperties(
                                   new TableCellWidth()
                {
                    Type = TableWidthUnitValues.Dxa, Width = "1900"
                }));
                cellOneProperties = new TableCellProperties();
                cellOneProperties.Append(new HorizontalMerge()
                {
                    Val = MergedCellValues.Restart
                });
                tcName1.Append(cellOneProperties);
                dataCells.Add(tcName1);

                tr.Append(dataCells.ToArray());
                tbl.AppendChild(tr);
            }
            return(tbl);
        }
        private static void GenerateWorkbookStylesPartContent(WorkbookStylesPart workbookStylesPart1)
        {
            Stylesheet stylesheet1 = new Stylesheet()
            {
                MCAttributes = new MarkupCompatibilityAttributes()
                {
                    Ignorable = "x14ac x16r2 xr"
                }
            };

            stylesheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            stylesheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");
            stylesheet1.AddNamespaceDeclaration("x16r2", "http://schemas.microsoft.com/office/spreadsheetml/2015/02/main");
            stylesheet1.AddNamespaceDeclaration("xr", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision");

            Fonts fonts1 = new Fonts()
            {
                Count = (UInt32Value)1U, KnownFonts = true
            };

            Font     font1     = new Font();
            FontSize fontSize1 = new FontSize()
            {
                Val = 11D
            };
            Color color1 = new Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName fontName1 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering1 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme1 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font1.Append(fontSize1);
            font1.Append(color1);
            font1.Append(fontName1);
            font1.Append(fontFamilyNumbering1);
            font1.Append(fontScheme1);

            fonts1.Append(font1);

            Fills fills1 = new Fills()
            {
                Count = (UInt32Value)2U
            };

            Fill        fill1        = new Fill();
            PatternFill patternFill1 = new PatternFill()
            {
                PatternType = PatternValues.None
            };

            fill1.Append(patternFill1);

            Fill        fill2        = new Fill();
            PatternFill patternFill2 = new PatternFill()
            {
                PatternType = PatternValues.Gray125
            };

            fill2.Append(patternFill2);

            fills1.Append(fill1);
            fills1.Append(fill2);

            Borders borders1 = new Borders()
            {
                Count = (UInt32Value)1U
            };

            Border         border1         = new Border();
            LeftBorder     leftBorder1     = new LeftBorder();
            RightBorder    rightBorder1    = new RightBorder();
            TopBorder      topBorder1      = new TopBorder();
            BottomBorder   bottomBorder1   = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);

            borders1.Append(border1);

            CellStyleFormats cellStyleFormats1 = new CellStyleFormats()
            {
                Count = (UInt32Value)1U
            };
            CellFormat cellFormat1 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U
            };

            cellStyleFormats1.Append(cellFormat1);

            CellFormats cellFormats1 = new CellFormats()
            {
                Count = (UInt32Value)2U
            };
            CellFormat cellFormat2 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            CellFormat cellFormat3 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)14U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true
            };

            cellFormats1.Append(cellFormat2);
            cellFormats1.Append(cellFormat3);

            CellStyles cellStyles1 = new CellStyles()
            {
                Count = (UInt32Value)1U
            };
            CellStyle cellStyle1 = new CellStyle()
            {
                Name = "Normal", FormatId = (UInt32Value)0U, BuiltinId = (UInt32Value)0U
            };

            cellStyles1.Append(cellStyle1);
            DifferentialFormats differentialFormats1 = new DifferentialFormats()
            {
                Count = (UInt32Value)0U
            };
            TableStyles tableStyles1 = new TableStyles()
            {
                Count = (UInt32Value)0U, DefaultTableStyle = "TableStyleMedium2", DefaultPivotStyle = "PivotStyleLight16"
            };

            StylesheetExtensionList stylesheetExtensionList1 = new StylesheetExtensionList();

            StylesheetExtension stylesheetExtension1 = new StylesheetExtension()
            {
                Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"
            };

            stylesheetExtension1.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");

            StylesheetExtension stylesheetExtension2 = new StylesheetExtension()
            {
                Uri = "{9260A510-F301-46a8-8635-F512D64BE5F5}"
            };

            stylesheetExtension2.AddNamespaceDeclaration("x15", "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main");

            OpenXmlUnknownElement openXmlUnknownElement4 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<x15:timelineStyles defaultTimelineStyle=\"TimeSlicerStyleLight1\" xmlns:x15=\"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main\" />");

            stylesheetExtension2.Append(openXmlUnknownElement4);

            stylesheetExtensionList1.Append(stylesheetExtension1);
            stylesheetExtensionList1.Append(stylesheetExtension2);

            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);
            stylesheet1.Append(tableStyles1);
            stylesheet1.Append(stylesheetExtensionList1);

            workbookStylesPart1.Stylesheet = stylesheet1;
        }
コード例 #19
0
        public TableProperties GetTableProperties(
            string borderColor = "#0000000",
            BorderValues b     = BorderValues.None,
            string tableWidth  = "2500"
            )
        {
            TableProperties tblProperties = new TableProperties();
            TableBorders    tblBorders    = new TableBorders();

            TableCellVerticalAlignment tcVA = new TableCellVerticalAlignment
            {
                Val = TableVerticalAlignmentValues.Center
            };

            tblBorders.AppendChild(tcVA);


            TopBorder topBorder = new TopBorder
            {
                Val   = new EnumValue <BorderValues>(b),
                Color = borderColor
            };

            tblBorders.AppendChild(topBorder);

            BottomBorder bottomBorder = new BottomBorder
            {
                Val   = new EnumValue <BorderValues>(b),
                Color = borderColor
            };

            tblBorders.AppendChild(bottomBorder);

            RightBorder rightBorder = new RightBorder
            {
                Val   = new EnumValue <BorderValues>(b),
                Color = borderColor
            };

            tblBorders.AppendChild(rightBorder);

            LeftBorder leftBorder = new LeftBorder
            {
                Val   = new EnumValue <BorderValues>(b),
                Color = borderColor
            };

            tblBorders.AppendChild(leftBorder);

            InsideHorizontalBorder insideHBorder = new InsideHorizontalBorder
            {
                Val   = new EnumValue <BorderValues>(b),
                Color = borderColor
            };

            tblBorders.AppendChild(insideHBorder);

            InsideVerticalBorder insideVBorder = new InsideVerticalBorder
            {
                Val   = new EnumValue <BorderValues>(b),
                Color = borderColor
            };

            tblBorders.AppendChild(insideVBorder);

            tblProperties.AppendChild(tblBorders);
            TableWidth width = new TableWidth
            {
                Width = tableWidth,
                Type  = TableWidthUnitValues.Pct
            };

            tblProperties.AppendChild(width);
            return(tblProperties);
        }
コード例 #20
0
        // Creates an TableCellBorders instance and adds its children.
        private TableCellBorders generateTableCellBordersBox()
        {
            TableCellBorders tableCellBorders1 = new TableCellBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

            tableCellBorders1.Append(topBorder1);
            tableCellBorders1.Append(leftBorder1);
            tableCellBorders1.Append(bottomBorder1);
            tableCellBorders1.Append(rightBorder1);

            return tableCellBorders1;
        }
コード例 #21
0
        public void MakeReport(/*string client, string analyst, int type*/)
        {
            using (WordprocessingDocument wordDocument = WordprocessingDocument.Open(reportFile, true))
            {
                var             mainPart  = wordDocument.MainDocumentPart.Document;
                Table           testtable = new Table();
                TableProperties vishProps = new TableProperties();
                //****------ TABLE BORDERS
                TableBorders vishBorders = new TableBorders();
                TopBorder    top         = new TopBorder()
                {
                    Val = BorderValues.Single, Color = "auto"
                };
                LeftBorder left = new LeftBorder()
                {
                    Val = BorderValues.Single, Color = "auto"
                };
                RightBorder right = new RightBorder()
                {
                    Val = BorderValues.Single, Color = "auto"
                };
                BottomBorder bottom = new BottomBorder()
                {
                    Val = BorderValues.Single, Color = "auto"
                };
                InsideHorizontalBorder horizontal = new InsideHorizontalBorder()
                {
                    Val = BorderValues.Single, Color = "auto",
                };
                InsideVerticalBorder vertical = new InsideVerticalBorder()
                {
                    Val = BorderValues.Single, Color = "auto"
                };
                vishBorders.Append(top);
                vishBorders.Append(left);
                vishBorders.Append(right);
                vishBorders.Append(bottom);
                vishBorders.Append(horizontal);
                vishBorders.Append(vertical);

                //****------ TABLE STYLE
                StyleRunProperties      stylerunprops = new StyleRunProperties();
                TablePositionProperties tableposprops = new TablePositionProperties()
                {
                    VerticalAnchor = VerticalAnchorValues.Margin, HorizontalAnchor = HorizontalAnchorValues.Margin
                };

                RunFonts headResRunFonts = new RunFonts()
                {
                    Ascii = "Arial"
                };
                FontSize fontSize = new FontSize()
                {
                    Val = "9"
                };
                stylerunprops.Append(headResRunFonts, fontSize);
                TableStyle tableStyle = new TableStyle()
                {
                    Val = "TableGrid"
                };
                TableWidth tableWidth = new TableWidth()
                {
                    Width = "10920", Type = TableWidthUnitValues.Dxa
                };
                TableLook tableLook = new TableLook()
                {
                    Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true
                };
                TableIndentation tableIndentation = new TableIndentation()
                {
                    Width = -10, Type = TableWidthUnitValues.Dxa
                };
                vishProps.Append(vishBorders, stylerunprops, tableWidth, tableposprops, tableStyle, tableLook, tableIndentation);
                testtable.Append(Columns(), vishProps);
                int[] widthIndex = new int[4] {
                    1780, 6230, 1590, 1320
                };
                int rows = perfectArray.GetUpperBound(0) + 1;
                int h    = 0;
                for (int i = 0; i < rows; i++)
                {
                    testtable.Append(HeaderRow());
                    var datarow = new TableRow();
                    var result  = new TableCell();
                    var name    = new TableCell();
                    var phone   = new TableCell();
                    var ext     = new TableCell();
                    var par1    = new Paragraph(new Run(new Text(String.Empty)));
                    var par2    = new Paragraph(new Run(new Text(perfectArray[i, 0])));
                    var par3    = new Paragraph(new Run(new Text(perfectArray[i, 1])));
                    var par4    = new Paragraph(new Run(new Text(perfectArray[i, 2])));

                    result.Append(par1);
                    name.Append(par2);
                    phone.Append(par3);
                    ext.Append(par4);
                    datarow.Append(result, name, phone, ext);

                    testtable.Append(datarow);
                    testtable.Append(DatesRow());
                    testtable.Append(DescriptionRow());
                }

                foreach (SdtBlock item in wordDocument.MainDocumentPart.Document.Body.Descendants <SdtBlock>().Where(e => e.Descendants <SdtAlias>().FirstOrDefault().Val == "PhoneTable"))
                {
                    item.InsertAfterSelf(testtable);
                }
                using (WordprocessingDocument newDocument = WordprocessingDocument.Create(saveFile, WordprocessingDocumentType.Document, true))
                {
                    var maindoc = newDocument.MainDocumentPart;
                    foreach (var parts in wordDocument.MainDocumentPart.Document.Descendants())
                    {
                        maindoc.Document.Append(parts);
                    }
                    newDocument.MainDocumentPart.Document.Save();
                }
            }
        }
コード例 #22
0
        private Table CreateFilledTable(bool hasBorder, bool hasInsideBorder)
        {
            //枠線有りテーブルを生成する(幅はページの幅)
            Table table = new Table();
            TableProperties tableProperties = new TableProperties();
            TableStyle tableStyle = new TableStyle() { Val = "TableGrid" };
            TableWidth tableWidth = new TableWidth() { Width = "5000", Type = TableWidthUnitValues.Pct };
            TableLook tableLook = new TableLook()
            {
                Val = "04A0",
                FirstRow = true,
                LastRow = false,
                FirstColumn = true,
                LastColumn = false,
                NoHorizontalBand = false,
                NoVerticalBand = true
            };
            tableProperties.Append(tableStyle);
            tableProperties.Append(tableWidth);
            tableProperties.Append(tableLook);

            TableBorders borders = new TableBorders();
            tableProperties.Append(borders);

            EnumValue<BorderValues> val = hasBorder ? BorderValues.Single : BorderValues.Nil;
            TopBorder topBorder = new TopBorder() { Val = val };
            BottomBorder bottomBorder = new BottomBorder() { Val = val };
            LeftBorder leftBorder = new LeftBorder() { Val = val };
            RightBorder rightBorder = new RightBorder() { Val = val };
            borders.Append(topBorder);
            borders.Append(bottomBorder);
            borders.Append(leftBorder);
            borders.Append(rightBorder);

            val = hasInsideBorder ? BorderValues.Single : BorderValues.Nil;
            InsideHorizontalBorder horizontalBorder = new InsideHorizontalBorder() { Val = val };
            InsideVerticalBorder verticalBorder = new InsideVerticalBorder() { Val = val };
            borders.Append(horizontalBorder);
            borders.Append(verticalBorder);

            table.Append(tableProperties);
            return table;
        }
コード例 #23
0
        public void DoTable1(Table table1)
        {
            TableProperties tableProperties1 = new TableProperties();
            TableWidth      tableWidth1      = new TableWidth()
            {
                Width = "15120", Type = TableWidthUnitValues.Dxa
            };
            TableIndentation tableIndentation1 = new TableIndentation()
            {
                Width = -72, Type = TableWidthUnitValues.Dxa
            };
            TableLook tableLook1 = new TableLook()
            {
                Val = "01E0"
            };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableIndentation1);
            tableProperties1.Append(tableLook1);

            TableGrid  tableGrid1  = new TableGrid();
            GridColumn gridColumn1 = new GridColumn()
            {
                Width = "1173"
            };
            GridColumn gridColumn2 = new GridColumn()
            {
                Width = "5103"
            };
            GridColumn gridColumn3 = new GridColumn()
            {
                Width = "283"
            };
            GridColumn gridColumn4 = new GridColumn()
            {
                Width = "3402"
            };
            GridColumn gridColumn5 = new GridColumn()
            {
                Width = "5159"
            };

            tableGrid1.Append(gridColumn1);
            tableGrid1.Append(gridColumn2);
            tableGrid1.Append(gridColumn3);
            tableGrid1.Append(gridColumn4);
            tableGrid1.Append(gridColumn5);

            TableRow tableRow1 = new TableRow()
            {
                RsidTableRowMarkRevision = "00ED7FB2", RsidTableRowAddition = "006B4849", RsidTableRowProperties = "00FA3A80"
            };

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth      tableCellWidth1      = new TableCellWidth()
            {
                Width = "1173", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders1 = new TableCellBorders();
            TopBorder        topBorder1        = new TopBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder1 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder1 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder1 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };

            tableCellBorders1.Append(topBorder1);
            tableCellBorders1.Append(leftBorder1);
            tableCellBorders1.Append(bottomBorder1);
            tableCellBorders1.Append(rightBorder1);
            Shading shading1 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto"
            };
            TableCellVerticalAlignment tableCellVerticalAlignment1 = new TableCellVerticalAlignment()
            {
                Val = TableVerticalAlignmentValues.Center
            };

            tableCellProperties1.Append(tableCellWidth1);
            tableCellProperties1.Append(tableCellBorders1);
            tableCellProperties1.Append(shading1);
            tableCellProperties1.Append(tableCellVerticalAlignment1);

            Paragraph paragraph2 = new Paragraph()
            {
                RsidParagraphMarkRevision = "00ED7FB2", RsidParagraphAddition = "006B4849", RsidParagraphProperties = "006B4849", RsidRunAdditionDefault = "006B4849"
            };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            RunFonts runFonts3 = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };

            paragraphMarkRunProperties2.Append(runFonts3);

            paragraphProperties2.Append(paragraphMarkRunProperties2);

            Run run2 = new Run();

            RunProperties runProperties2 = new RunProperties();
            RunFonts      runFonts4      = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };

            runProperties2.Append(runFonts4);
            Text text2 = new Text();

            text2.Text = "Location";

            run2.Append(runProperties2);
            run2.Append(text2);

            paragraph2.Append(paragraphProperties2);
            paragraph2.Append(run2);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph2);

            TableCell tableCell2 = new TableCell();

            TableCellProperties tableCellProperties2 = new TableCellProperties();
            TableCellWidth      tableCellWidth2      = new TableCellWidth()
            {
                Width = "5103", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders2 = new TableCellBorders();
            TopBorder        topBorder2        = new TopBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder2 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder2 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder2 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };

            tableCellBorders2.Append(topBorder2);
            tableCellBorders2.Append(leftBorder2);
            tableCellBorders2.Append(bottomBorder2);
            tableCellBorders2.Append(rightBorder2);
            Shading shading2 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto"
            };
            TableCellVerticalAlignment tableCellVerticalAlignment2 = new TableCellVerticalAlignment()
            {
                Val = TableVerticalAlignmentValues.Center
            };

            tableCellProperties2.Append(tableCellWidth2);
            tableCellProperties2.Append(tableCellBorders2);
            tableCellProperties2.Append(shading2);
            tableCellProperties2.Append(tableCellVerticalAlignment2);

            Paragraph paragraph3 = new Paragraph()
            {
                RsidParagraphMarkRevision = "00ED7FB2", RsidParagraphAddition = "006B4849", RsidParagraphProperties = "00030688", RsidRunAdditionDefault = "00030688"
            };

            ParagraphProperties paragraphProperties3 = new ParagraphProperties();
            Justification       justification2       = new Justification()
            {
                Val = JustificationValues.Center
            };

            ParagraphMarkRunProperties paragraphMarkRunProperties3 = new ParagraphMarkRunProperties();
            RunFonts runFonts5 = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };

            paragraphMarkRunProperties3.Append(runFonts5);

            paragraphProperties3.Append(justification2);
            paragraphProperties3.Append(paragraphMarkRunProperties3);
            ProofError proofError1 = new ProofError()
            {
                Type = ProofingErrorValues.SpellStart
            };

            Run run3 = new Run();

            RunProperties runProperties3 = new RunProperties();
            RunFonts      runFonts6      = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };

            runProperties3.Append(runFonts6);
            Text   text3    = new Text();
            string Location = labSheetA1Sheet.SubsectorName.Substring(labSheetA1Sheet.SubsectorName.IndexOf(" ") + 1);

            text3.Text = labSheetA1Sheet.SubsectorName.Substring(0, labSheetA1Sheet.SubsectorName.IndexOf(" ")) +
                         " (" + (Location.Length > 20 ? Location.Substring(0, 20).Replace("(", "").Replace(")", "") + " ...)" : Location.Replace("(", "").Replace(")", "") + ")");

            run3.Append(runProperties3);
            run3.Append(text3);
            ProofError proofError2 = new ProofError()
            {
                Type = ProofingErrorValues.SpellEnd
            };

            paragraph3.Append(paragraphProperties3);
            paragraph3.Append(proofError1);
            paragraph3.Append(run3);
            paragraph3.Append(proofError2);

            tableCell2.Append(tableCellProperties2);
            tableCell2.Append(paragraph3);

            TableCell tableCell3 = new TableCell();

            TableCellProperties tableCellProperties3 = new TableCellProperties();
            TableCellWidth      tableCellWidth3      = new TableCellWidth()
            {
                Width = "283", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders3 = new TableCellBorders();
            LeftBorder       leftBorder3       = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder3 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };

            tableCellBorders3.Append(leftBorder3);
            tableCellBorders3.Append(rightBorder3);
            Shading shading3 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto"
            };
            TableCellVerticalAlignment tableCellVerticalAlignment3 = new TableCellVerticalAlignment()
            {
                Val = TableVerticalAlignmentValues.Center
            };

            tableCellProperties3.Append(tableCellWidth3);
            tableCellProperties3.Append(tableCellBorders3);
            tableCellProperties3.Append(shading3);
            tableCellProperties3.Append(tableCellVerticalAlignment3);

            Paragraph paragraph4 = new Paragraph()
            {
                RsidParagraphMarkRevision = "008162D3", RsidParagraphAddition = "006B4849", RsidParagraphProperties = "008162D3", RsidRunAdditionDefault = "006B4849"
            };

            ParagraphProperties paragraphProperties4 = new ParagraphProperties();

            ParagraphMarkRunProperties paragraphMarkRunProperties4 = new ParagraphMarkRunProperties();
            RunFonts runFonts7 = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };
            FontSize fontSize1 = new FontSize()
            {
                Val = "20"
            };
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript()
            {
                Val = "20"
            };

            paragraphMarkRunProperties4.Append(runFonts7);
            paragraphMarkRunProperties4.Append(fontSize1);
            paragraphMarkRunProperties4.Append(fontSizeComplexScript1);

            paragraphProperties4.Append(paragraphMarkRunProperties4);

            paragraph4.Append(paragraphProperties4);

            tableCell3.Append(tableCellProperties3);
            tableCell3.Append(paragraph4);

            TableCell tableCell4 = new TableCell();

            TableCellProperties tableCellProperties4 = new TableCellProperties();
            TableCellWidth      tableCellWidth4      = new TableCellWidth()
            {
                Width = "3402", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders4 = new TableCellBorders();
            TopBorder        topBorder3        = new TopBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder4 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder3 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder4 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };

            tableCellBorders4.Append(topBorder3);
            tableCellBorders4.Append(leftBorder4);
            tableCellBorders4.Append(bottomBorder3);
            tableCellBorders4.Append(rightBorder4);
            Shading shading4 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto"
            };
            TableCellVerticalAlignment tableCellVerticalAlignment4 = new TableCellVerticalAlignment()
            {
                Val = TableVerticalAlignmentValues.Center
            };

            tableCellProperties4.Append(tableCellWidth4);
            tableCellProperties4.Append(tableCellBorders4);
            tableCellProperties4.Append(shading4);
            tableCellProperties4.Append(tableCellVerticalAlignment4);

            Paragraph paragraph5 = new Paragraph()
            {
                RsidParagraphMarkRevision = "00ED7FB2", RsidParagraphAddition = "006B4849", RsidParagraphProperties = "008162D3", RsidRunAdditionDefault = "006B4849"
            };

            ParagraphProperties paragraphProperties5 = new ParagraphProperties();
            Justification       justification3       = new Justification()
            {
                Val = JustificationValues.Center
            };

            ParagraphMarkRunProperties paragraphMarkRunProperties5 = new ParagraphMarkRunProperties();
            RunFonts runFonts8 = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };

            paragraphMarkRunProperties5.Append(runFonts8);

            paragraphProperties5.Append(justification3);
            paragraphProperties5.Append(paragraphMarkRunProperties5);

            Run run4 = new Run()
            {
                RsidRunProperties = "006B4849"
            };

            RunProperties runProperties4 = new RunProperties();
            RunFonts      runFonts9      = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };
            Highlight highlight1 = new Highlight()
            {
                Val = HighlightColorValues.Yellow
            };

            runProperties4.Append(runFonts9);
            runProperties4.Append(highlight1);
            Text text4 = new Text();

            text4.Text = "Sampling / Processing Date:";

            run4.Append(runProperties4);
            run4.Append(text4);

            Run run5 = new Run()
            {
                RsidRunProperties = "00ED7FB2"
            };

            RunProperties runProperties5 = new RunProperties();
            RunFonts      runFonts10     = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };

            runProperties5.Append(runFonts10);
            Text text5 = new Text()
            {
                Space = SpaceProcessingModeValues.Preserve
            };

            text5.Text = "  ";

            run5.Append(runProperties5);
            run5.Append(text5);

            paragraph5.Append(paragraphProperties5);
            paragraph5.Append(run4);
            paragraph5.Append(run5);

            tableCell4.Append(tableCellProperties4);
            tableCell4.Append(paragraph5);

            TableCell tableCell5 = new TableCell();

            TableCellProperties tableCellProperties5 = new TableCellProperties();
            TableCellWidth      tableCellWidth5      = new TableCellWidth()
            {
                Width = "5159", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders5 = new TableCellBorders();
            TopBorder        topBorder4        = new TopBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder5 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder4 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder5 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)12U, Space = (UInt32Value)0U
            };

            tableCellBorders5.Append(topBorder4);
            tableCellBorders5.Append(leftBorder5);
            tableCellBorders5.Append(bottomBorder4);
            tableCellBorders5.Append(rightBorder5);
            Shading shading5 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto"
            };
            TableCellVerticalAlignment tableCellVerticalAlignment5 = new TableCellVerticalAlignment()
            {
                Val = TableVerticalAlignmentValues.Center
            };

            tableCellProperties5.Append(tableCellWidth5);
            tableCellProperties5.Append(tableCellBorders5);
            tableCellProperties5.Append(shading5);
            tableCellProperties5.Append(tableCellVerticalAlignment5);

            Paragraph paragraph6 = new Paragraph()
            {
                RsidParagraphMarkRevision = "00ED7FB2", RsidParagraphAddition = "006B4849", RsidParagraphProperties = "00030688", RsidRunAdditionDefault = "00030688"
            };

            ParagraphProperties paragraphProperties6 = new ParagraphProperties();
            Justification       justification4       = new Justification()
            {
                Val = JustificationValues.Center
            };

            ParagraphMarkRunProperties paragraphMarkRunProperties6 = new ParagraphMarkRunProperties();
            RunFonts runFonts11 = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };
            Color color1 = new Color()
            {
                Val = "EAEAEA"
            };

            paragraphMarkRunProperties6.Append(runFonts11);
            paragraphMarkRunProperties6.Append(color1);

            paragraphProperties6.Append(justification4);
            paragraphProperties6.Append(paragraphMarkRunProperties6);
            ProofError proofError3 = new ProofError()
            {
                Type = ProofingErrorValues.SpellStart
            };

            Run run6 = new Run();

            RunProperties runProperties6 = new RunProperties();
            RunFonts      runFonts12     = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };

            runProperties6.Append(runFonts12);
            Text     text6       = new Text();
            DateTime SampleDate  = new DateTime(int.Parse(labSheetA1Sheet.RunYear), int.Parse(labSheetA1Sheet.RunMonth), int.Parse(labSheetA1Sheet.RunDay));
            DateTime ProcessDate = (bool.Parse(labSheetA1Sheet.IncubationStartSameDay) == true ? SampleDate : SampleDate.AddDays(1));

            text6.Text = SampleDate.ToString("yyyy MMMM dd") + " / " + ProcessDate.ToString("yyyy MMMM dd");

            run6.Append(runProperties6);
            run6.Append(text6);
            ProofError proofError4 = new ProofError()
            {
                Type = ProofingErrorValues.SpellEnd
            };


            paragraph6.Append(paragraphProperties6);
            paragraph6.Append(proofError3);
            paragraph6.Append(run6);
            paragraph6.Append(proofError4);

            tableCell5.Append(tableCellProperties5);
            tableCell5.Append(paragraph6);

            tableRow1.Append(tableCell1);
            tableRow1.Append(tableCell2);
            tableRow1.Append(tableCell3);
            tableRow1.Append(tableCell4);
            tableRow1.Append(tableCell5);

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(tableRow1);

            Paragraph paragraph7 = new Paragraph()
            {
                RsidParagraphMarkRevision = "00D10A17", RsidParagraphAddition = "00004340", RsidRunAdditionDefault = "00004340"
            };

            ParagraphProperties paragraphProperties7 = new ParagraphProperties();

            ParagraphMarkRunProperties paragraphMarkRunProperties7 = new ParagraphMarkRunProperties();
            RunFonts runFonts15 = new RunFonts()
            {
                Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial"
            };
            FontSize fontSize2 = new FontSize()
            {
                Val = "8"
            };

            paragraphMarkRunProperties7.Append(runFonts15);
            paragraphMarkRunProperties7.Append(fontSize2);

            paragraphProperties7.Append(paragraphMarkRunProperties7);

            paragraph7.Append(paragraphProperties7);
        }
コード例 #24
0
        // Creates an Document instance and adds its children.
        public void GenerateLabelsDocument(string fileName, List<Interview> candidateList)
        {
            Document document1 = new Document(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 wp14" }  };
            document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Body body1 = new Body();

            DocumentFormat.OpenXml.Wordprocessing.Table table1 = new DocumentFormat.OpenXml.Wordprocessing.Table();

            TableProperties tableProperties1 = new TableProperties();
            DocumentFormat.OpenXml.Wordprocessing.TableStyle tableStyle1 = new DocumentFormat.OpenXml.Wordprocessing.TableStyle() { Val = "TableGrid" };
            TableWidth tableWidth1 = new TableWidth(){ Width = "0", Type = TableWidthUnitValues.Auto };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder topBorder1 = new TopBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
            LeftBorder leftBorder1 = new LeftBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder1 = new BottomBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder(){ Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);
            TableLayout tableLayout1 = new TableLayout(){ Type = TableLayoutValues.Fixed };

            TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault();
            TableCellLeftMargin tableCellLeftMargin1 = new TableCellLeftMargin(){ Width = 15, Type = TableWidthValues.Dxa };
            TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin(){ Width = 15, Type = TableWidthValues.Dxa };

            tableCellMarginDefault1.Append(tableCellLeftMargin1);
            tableCellMarginDefault1.Append(tableCellRightMargin1);
            TableLook tableLook1 = new TableLook(){ Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false };

            tableProperties1.Append(tableStyle1);
            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableLayout1);
            tableProperties1.Append(tableCellMarginDefault1);
            tableProperties1.Append(tableLook1);

            table1.Append(tableProperties1);

            TableGrid tableGrid1 = new TableGrid();
            GridColumn gridColumn1 = new GridColumn(){ Width = "5760" };
            GridColumn gridColumn2 = new GridColumn(){ Width = "270" };
            GridColumn gridColumn3 = new GridColumn(){ Width = "5760" };

            tableGrid1.Append(gridColumn1);
            tableGrid1.Append(gridColumn2);
            tableGrid1.Append(gridColumn3);

            table1.Append(tableGrid1);

            string sex = Sex.M.ToString();
            Interview interview1, interview2;
            BioData bioData1, bioData2;
            for(int i = 0; i < candidateList.Count(); i=i+2)
            {
                interview1 = candidateList.ElementAt(i);
                bioData1 = interview1.BioData;
                if ((i + 1) < candidateList.Count())
                {
                    interview2 = candidateList.ElementAt(i + 1);
                    bioData2 = interview2.BioData;
                }
                else
                {
                    interview2 = null;
                    bioData2 = null;
                }

                DocumentFormat.OpenXml.Wordprocessing.TableRow tableRow1 = new DocumentFormat.OpenXml.Wordprocessing.TableRow() { RsidTableRowAddition = "003D48DC" };

                TablePropertyExceptions tablePropertyExceptions1 = new TablePropertyExceptions();

                TableCellMarginDefault tableCellMarginDefault2 = new TableCellMarginDefault();
                TopMargin topMargin1 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
                BottomMargin bottomMargin1 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };

                tableCellMarginDefault2.Append(topMargin1);
                tableCellMarginDefault2.Append(bottomMargin1);

                tablePropertyExceptions1.Append(tableCellMarginDefault2);

                TableRowProperties tableRowProperties1 = new TableRowProperties();
                CantSplit cantSplit1 = new CantSplit();
                TableRowHeight tableRowHeight1 = new TableRowHeight() { Val = (UInt32Value)1440U, HeightType = HeightRuleValues.Exact };

                tableRowProperties1.Append(cantSplit1);
                tableRowProperties1.Append(tableRowHeight1);

                DocumentFormat.OpenXml.Wordprocessing.TableCell tableCell1 = new DocumentFormat.OpenXml.Wordprocessing.TableCell();

                TableCellProperties tableCellProperties1 = new TableCellProperties();
                TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "5760", Type = TableWidthUnitValues.Dxa };

                tableCellProperties1.Append(tableCellWidth1);

                Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "003D48DC", RsidParagraphProperties = "003D48DC", RsidRunAdditionDefault = "003D48DC" };

                ParagraphProperties paragraphProperties1 = new ParagraphProperties();
                Indentation indentation1 = new Indentation() { Left = "144", Right = "144" };

                paragraphProperties1.Append(indentation1);

                Run run1 = new Run();
                Text text1 = new Text();
                Text text1_2 = new Text();
                text1.Text = bioData1.LName + ", " + bioData1.FName + ", " + bioData1.MName + "    " + bioData1.Sources.SourcesValue;
                text1_2.Text = bioData1.SSN + "    " + interview1.Date.Value.ToShortDateString();

                run1.Append(text1);
                run1.Append(new Break());
                run1.Append(text1_2);

                paragraph1.Append(paragraphProperties1);
                paragraph1.Append(run1);

                tableCell1.Append(tableCellProperties1);
                tableCell1.Append(paragraph1);

                DocumentFormat.OpenXml.Wordprocessing.TableCell tableCell2 = new DocumentFormat.OpenXml.Wordprocessing.TableCell();

                TableCellProperties tableCellProperties2 = new TableCellProperties();
                TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "270", Type = TableWidthUnitValues.Dxa };

                tableCellProperties2.Append(tableCellWidth2);

                Paragraph paragraph2 = new Paragraph() { RsidParagraphAddition = "003D48DC", RsidParagraphProperties = "003D48DC", RsidRunAdditionDefault = "003D48DC" };

                ParagraphProperties paragraphProperties2 = new ParagraphProperties();
                Indentation indentation2 = new Indentation() { Left = "144", Right = "144" };

                paragraphProperties2.Append(indentation2);

                paragraph2.Append(paragraphProperties2);

                tableCell2.Append(tableCellProperties2);
                tableCell2.Append(paragraph2);

                DocumentFormat.OpenXml.Wordprocessing.TableCell tableCell3 = new DocumentFormat.OpenXml.Wordprocessing.TableCell();

                TableCellProperties tableCellProperties3 = new TableCellProperties();
                TableCellWidth tableCellWidth3 = new TableCellWidth() { Width = "5760", Type = TableWidthUnitValues.Dxa };

                tableCellProperties3.Append(tableCellWidth3);

                Paragraph paragraph3 = new Paragraph() { RsidParagraphAddition = "003D48DC", RsidParagraphProperties = "003D48DC", RsidRunAdditionDefault = "003D48DC" };

                ParagraphProperties paragraphProperties3 = new ParagraphProperties();
                Indentation indentation3 = new Indentation() { Left = "144", Right = "144" };

                paragraphProperties3.Append(indentation3);

                Run run2 = new Run();
                Text text2 = new Text();
                Text text2_2 = new Text();
                if (bioData2 != null)
                {
                    text2.Text = bioData2.LName + ", " + bioData2.FName + ", " + bioData2.MName + "    " + bioData2.Sources.SourcesValue;
                    text2_2.Text = bioData2.SSN + "    " + interview2.Date.Value.ToShortDateString();
                }
                else
                {
                    text2.Text = "";
                    text2_2.Text = "";
                }

                run2.Append(text2);
                run2.Append(new Break());
                run2.Append(text2_2);

                paragraph3.Append(paragraphProperties3);
                paragraph3.Append(run2);

                tableCell3.Append(tableCellProperties3);
                tableCell3.Append(paragraph3);

                tableRow1.Append(tablePropertyExceptions1);
                tableRow1.Append(tableRowProperties1);
                tableRow1.Append(tableCell1);
                tableRow1.Append(tableCell2);
                tableRow1.Append(tableCell3);

                table1.Append(tableRow1);
            }
            Paragraph paragraph31 = new Paragraph() { RsidParagraphMarkRevision = "003D48DC", RsidParagraphAddition = "003D48DC", RsidParagraphProperties = "003D48DC", RsidRunAdditionDefault = "003D48DC" };

            ParagraphProperties paragraphProperties31 = new ParagraphProperties();
            Indentation indentation31 = new Indentation() { Left = "144", Right = "144" };

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            Vanish vanish1 = new Vanish();

            paragraphMarkRunProperties1.Append(vanish1);

            paragraphProperties31.Append(indentation31);
            paragraphProperties31.Append(paragraphMarkRunProperties1);

            paragraph31.Append(paragraphProperties31);

            SectionProperties sectionProperties1 = new SectionProperties() { RsidRPr = "003D48DC", RsidR = "003D48DC", RsidSect = "003D48DC" };
            SectionType sectionType1 = new SectionType() { Val = SectionMarkValues.Continuous };
            PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U };
            PageMargin pageMargin1 = new PageMargin() { Top = 720, Right = (UInt32Value)240U, Bottom = 0, Left = (UInt32Value)240U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
            Columns columns1 = new Columns() { Space = "720" };

            sectionProperties1.Append(sectionType1);
            sectionProperties1.Append(pageSize1);
            sectionProperties1.Append(pageMargin1);
            sectionProperties1.Append(columns1);

            body1.Append(table1);
            body1.Append(paragraph31);
            body1.Append(sectionProperties1);

            document1.Append(body1);
            //return document1;

            string contentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
            using (MemoryStream generatedDocument = new MemoryStream())
            {
                using (WordprocessingDocument package = WordprocessingDocument.Create(generatedDocument, WordprocessingDocumentType.Document))
                {
                    MainDocumentPart mainPart = package.MainDocumentPart;
                    if (mainPart == null)
                    {
                        mainPart = package.AddMainDocumentPart();
                        document1.Save(mainPart);
                    }

                    Body body = mainPart.Document.Body;

                    //I have no idea why it doesnt work when you try to use pageBreakParagraph... but it doesnt... so redeclare this same string here
                    string lineBreakCharacter = "%$%lineBreak%$%";

                    List<Paragraph> pageBreakMarkers = new List<Paragraph>();
                    var lastP = mainPart.Document.Descendants<Paragraph>().LastOrDefault();
                    foreach (Paragraph P in mainPart.Document.Descendants<Paragraph>())
                    {
                        foreach (Run R in P.Descendants<Run>())
                        {
                            if (R.Descendants<Text>()
                                .Where(T => T.Text == lineBreakCharacter).Count() > 0)
                            {
                                if (P != lastP)
                                {
                                    P.InsertAfterSelf
                                        (new Paragraph(
                                            new Run(
                                                new Break() { Type = BreakValues.Page })));
                                }
                                pageBreakMarkers.Add(P);
                            }
                        }
                    }
                    foreach (Paragraph P in pageBreakMarkers)
                    {
                        P.Remove();
                    }

                    mainPart.Document.Save();
                }

                byte[] bytesInStream = generatedDocument.ToArray(); // simpler way of converting to array
                generatedDocument.Close();

                Response.Clear();
                Response.ContentType = contentType;
                Response.AddHeader("content-disposition", "attachment;filename=" + fileName);

                //this will generate problems
                Response.BinaryWrite(bytesInStream);
                try
                {
                    Response.End();
                }
                catch (Exception ex)
                {
                    //Response.End(); generates an exception. if you don't use it, you get some errors when Word opens the file...
                    System.Diagnostics.Debug.WriteLine(ex.Message);
                }

            }
        }
コード例 #25
0
ファイル: PictureRow.cs プロジェクト: sengithub/SenSourcecode
//	    private static void ddd()
//	    {
//	        var img = new BitmapImage(new Uri("", UriKind.RelativeOrAbsolute));
//	        var widthPx = img.PixelWidth;
//	        var heightPx = img.PixelHeight;
//	        var horzRezDpi = img.DpiX;
//	        var vertRezDpi = img.DpiY;
//	        const int emusPerInch = 914400;
//	        const int emusPerCm = 360000;
//	        var widthEmus = (long) (widthPx/horzRezDpi*emusPerInch);
//	        var heightEmus = (long) (heightPx/vertRezDpi*emusPerInch);
//	        var maxWidthEmus = (long) (maxWidthCm*emusPerCm);
//	        if (widthEmus > maxWidthEmus)
//	        {
//	            var ratio = (heightEmus*1.0m)/widthEmus;
//	            widthEmus = maxWidthEmus;
//	            heightEmus = (long) (widthEmus*ratio);
//	        }
//	    }
//        public void ResizeImage(string OriginalFile, string NewFile, int NewWidth, int MaxHeight, bool OnlyResizeIfWider)
//{
//	System.Drawing.Image FullsizeImage = System.Drawing.Image.FromFile(OriginalFile);
//
//	// Prevent using images internal thumbnail
//	FullsizeImage.RotateFlip(System.Drawing.RotateFlipType.Rotate180FlipNone);
//	FullsizeImage.RotateFlip(System.Drawing.RotateFlipType.Rotate180FlipNone);
//
//	if (OnlyResizeIfWider)
//	{
//		if (FullsizeImage.Width <= NewWidth)
//		{
//			NewWidth = FullsizeImage.Width;
//		}
//	}
//
//	int NewHeight = FullsizeImage.Height * NewWidth / FullsizeImage.Width;
//	if (NewHeight > MaxHeight)
//	{
//		// Resize with height instead
//		NewWidth = FullsizeImage.Width * MaxHeight / FullsizeImage.Height;
//		NewHeight = MaxHeight;
//	}
//
//	System.Drawing.Image NewImage = FullsizeImage.GetThumbnailImage(NewWidth, NewHeight, null, IntPtr.Zero);
//
//	// Clear handle to original file so that we can overwrite it if necessary
//	FullsizeImage.Dispose();
//
//	// Save resized picture
//	NewImage.Save(NewFile);
//}
//
        // Creates an Paragraph instance and adds its children.
        public TableRow GenerateTableRow(IndividualInfo ii, string iid)
        {
            TableRow tableRow1 = new TableRow()
            {
                RsidTableRowAddition = "00FB1F22", RsidTableRowProperties = "00442AD3"
            };

            TableRowProperties tableRowProperties1 = new TableRowProperties();
            CantSplit          cantSplit1          = new CantSplit();

            tableRowProperties1.Append(cantSplit1);

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth      tableCellWidth1      = new TableCellWidth()
            {
                Width = "4788", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties1.Append(tableCellWidth1);

            Paragraph paragraph1 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Run   run1   = new Run();
            Break break1 = new Break();

            run1.Append(break1);

            Run run2 = new Run();

            RunProperties runProperties1 = new RunProperties();
            NoProof       noProof1       = new NoProof();

            runProperties1.Append(noProof1);
            Text text1 = new Text();

            text1.Text = ii.FirstName;

            run2.Append(runProperties1);
            run2.Append(text1);

            Run  run3  = new Run();
            Text text2 = new Text()
            {
                Space = SpaceProcessingModeValues.Preserve
            };

            text2.Text = " ";

            run3.Append(text2);

            Run run4 = new Run();

            RunProperties runProperties2 = new RunProperties();
            NoProof       noProof2       = new NoProof();

            runProperties2.Append(noProof2);
            Text text3 = new Text();

            text3.Text = ii.LastName;

            run4.Append(runProperties2);
            run4.Append(text3);

            paragraph1.Append(run1);
            paragraph1.Append(run2);
            paragraph1.Append(run3);
            paragraph1.Append(run4);

            Paragraph paragraph2 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00731A43", RsidRunAdditionDefault = "00FB1F22"
            };

            Run run5 = new Run();

            RunProperties runProperties3 = new RunProperties();
            NoProof       noProof3       = new NoProof();

            runProperties3.Append(noProof3);
            Text text4 = new Text();

            text4.Text = ii.Address;

            run5.Append(runProperties3);
            run5.Append(text4);

            paragraph2.Append(run5);


            Paragraph paragraph2a = null;

            if (ii.Address2.HasValue())
            {
                paragraph2a = new Paragraph()
                {
                    RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00731A43", RsidRunAdditionDefault = "00FB1F22"
                };
                Run r = new Run();

                RunProperties rp = new RunProperties();
                NoProof       np = new NoProof();

                rp.Append(np);
                Text tt = new Text();
                tt.Text = ii.Address;

                r.Append(rp);
                r.Append(tt);

                paragraph2a.Append(r);
            }


            Paragraph paragraph3 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00731A43", RsidRunAdditionDefault = "00FB1F22"
            };

            Run run6 = new Run();

            RunProperties runProperties4 = new RunProperties();
            NoProof       noProof4       = new NoProof();

            runProperties4.Append(noProof4);
            Text text5 = new Text();

            text5.Text = ii.CityStateZip;
            run6.Append(runProperties4);
            run6.Append(text5);

            paragraph3.Append(run6);

            Paragraph paragraph4 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableStyle      tableStyle1      = new TableStyle()
            {
                Val = "TableGrid"
            };
            TableWidth tableWidth1 = new TableWidth()
            {
                Width = "0", Type = TableWidthUnitValues.Auto
            };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder    topBorder1    = new TopBorder()
            {
                Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder1 = new LeftBorder()
            {
                Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder1 = new BottomBorder()
            {
                Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder1 = new RightBorder()
            {
                Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder()
            {
                Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder()
            {
                Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);
            TableLook tableLook1 = new TableLook()
            {
                Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true
            };

            tableProperties1.Append(tableStyle1);
            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableLook1);

            TableGrid  tableGrid1  = new TableGrid();
            GridColumn gridColumn1 = new GridColumn()
            {
                Width = "1435"
            };
            GridColumn gridColumn2 = new GridColumn()
            {
                Width = "3122"
            };

            tableGrid1.Append(gridColumn1);
            tableGrid1.Append(gridColumn2);

            TableRow tableRow2 = new TableRow()
            {
                RsidTableRowAddition = "00FB1F22", RsidTableRowProperties = "00731A43"
            };

            TableCell tableCell2 = new TableCell();

            TableCellProperties tableCellProperties2 = new TableCellProperties();
            TableCellWidth      tableCellWidth2      = new TableCellWidth()
            {
                Width = "1435", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties2.Append(tableCellWidth2);

            Paragraph paragraph5 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Run  run11  = new Run();
            Text text10 = new Text();

            text10.Text = "Email";

            run11.Append(text10);

            paragraph5.Append(run11);

            tableCell2.Append(tableCellProperties2);
            tableCell2.Append(paragraph5);

            TableCell tableCell3 = new TableCell();

            TableCellProperties tableCellProperties3 = new TableCellProperties();
            TableCellWidth      tableCellWidth3      = new TableCellWidth()
            {
                Width = "3122", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties3.Append(tableCellWidth3);
            Paragraph paragraph6 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00485B24", RsidRunAdditionDefault = "00FB1F22"
            };

            paragraph6.Append(new Run(new Text(ii.Email)));

            tableCell3.Append(tableCellProperties3);
            tableCell3.Append(paragraph6);

            tableRow2.Append(tableCell2);
            tableRow2.Append(tableCell3);

            TableRow tableRow3 = new TableRow()
            {
                RsidTableRowAddition = "00FB1F22", RsidTableRowProperties = "00731A43"
            };

            TableCell tableCell4 = new TableCell();

            TableCellProperties tableCellProperties4 = new TableCellProperties();
            TableCellWidth      tableCellWidth4      = new TableCellWidth()
            {
                Width = "1435", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties4.Append(tableCellWidth4);

            Paragraph paragraph7 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Run  run12  = new Run();
            Text text11 = new Text();

            text11.Text = "Home Phone";

            run12.Append(text11);

            paragraph7.Append(run12);

            tableCell4.Append(tableCellProperties4);
            tableCell4.Append(paragraph7);

            TableCell tableCell5 = new TableCell();

            TableCellProperties tableCellProperties5 = new TableCellProperties();
            TableCellWidth      tableCellWidth5      = new TableCellWidth()
            {
                Width = "3122", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties5.Append(tableCellWidth5);

            Paragraph paragraph8 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00485B24", RsidRunAdditionDefault = "00FB1F22"
            };

            Run run13 = new Run();

            RunProperties runProperties7 = new RunProperties();
            NoProof       noProof7       = new NoProof();

            runProperties7.Append(noProof7);
            Text text12 = new Text();

            text12.Text = ii.HomePhone.FmtFone();

            run13.Append(runProperties7);
            run13.Append(text12);

            Run  run14  = new Run();
            Text text13 = new Text()
            {
                Space = SpaceProcessingModeValues.Preserve
            };

            text13.Text = " ";

            run14.Append(text13);

            paragraph8.Append(run13);
            paragraph8.Append(run14);

            tableCell5.Append(tableCellProperties5);
            tableCell5.Append(paragraph8);

            tableRow3.Append(tableCell4);
            tableRow3.Append(tableCell5);

            TableRow tableRow4 = new TableRow()
            {
                RsidTableRowAddition = "00FB1F22", RsidTableRowProperties = "00731A43"
            };

            TableCell tableCell6 = new TableCell();

            TableCellProperties tableCellProperties6 = new TableCellProperties();
            TableCellWidth      tableCellWidth6      = new TableCellWidth()
            {
                Width = "1435", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties6.Append(tableCellWidth6);

            Paragraph paragraph9 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Run  run15  = new Run();
            Text text14 = new Text();

            text14.Text = "Cell Phone";

            run15.Append(text14);

            paragraph9.Append(run15);

            tableCell6.Append(tableCellProperties6);
            tableCell6.Append(paragraph9);

            TableCell tableCell7 = new TableCell();

            TableCellProperties tableCellProperties7 = new TableCellProperties();
            TableCellWidth      tableCellWidth7      = new TableCellWidth()
            {
                Width = "3122", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties7.Append(tableCellWidth7);

            Paragraph paragraph10 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Run run16 = new Run();

            RunProperties runProperties8 = new RunProperties();
            NoProof       noProof8       = new NoProof();

            runProperties8.Append(noProof8);
            Text text15 = new Text();

            text15.Text = ii.CellPhone.FmtFone();

            run16.Append(runProperties8);
            run16.Append(text15);

            paragraph10.Append(run16);

            tableCell7.Append(tableCellProperties7);
            tableCell7.Append(paragraph10);

            tableRow4.Append(tableCell6);
            tableRow4.Append(tableCell7);

            TableRow tableRow5 = new TableRow()
            {
                RsidTableRowAddition = "00FB1F22", RsidTableRowProperties = "00731A43"
            };

            TableCell tableCell8 = new TableCell();

            TableCellProperties tableCellProperties8 = new TableCellProperties();
            TableCellWidth      tableCellWidth8      = new TableCellWidth()
            {
                Width = "1435", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties8.Append(tableCellWidth8);

            Paragraph paragraph11 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Run  run17  = new Run();
            Text text16 = new Text();

            text16.Text = "Work Phone";

            run17.Append(text16);

            paragraph11.Append(run17);

            tableCell8.Append(tableCellProperties8);
            tableCell8.Append(paragraph11);

            TableCell tableCell9 = new TableCell();

            TableCellProperties tableCellProperties9 = new TableCellProperties();
            TableCellWidth      tableCellWidth9      = new TableCellWidth()
            {
                Width = "3122", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties9.Append(tableCellWidth9);

            Paragraph paragraph12 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Run run18 = new Run();

            RunProperties runProperties9 = new RunProperties();
            NoProof       noProof9       = new NoProof();

            runProperties9.Append(noProof9);
            Text text17 = new Text();

            text17.Text = ii.WorkPhone.FmtFone();

            run18.Append(runProperties9);
            run18.Append(text17);

            paragraph12.Append(run18);

            tableCell9.Append(tableCellProperties9);
            tableCell9.Append(paragraph12);

            tableRow5.Append(tableCell8);
            tableRow5.Append(tableCell9);

            TableRow tableRow6 = new TableRow()
            {
                RsidTableRowAddition = "00FB1F22", RsidTableRowProperties = "00731A43"
            };

            TableCell tableCell10 = new TableCell();

            TableCellProperties tableCellProperties10 = new TableCellProperties();
            TableCellWidth      tableCellWidth10      = new TableCellWidth()
            {
                Width = "1435", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties10.Append(tableCellWidth10);

            Paragraph paragraph13 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Run  run19  = new Run();
            Text text18 = new Text();

            text18.Text = "Birthday";

            run19.Append(text18);

            paragraph13.Append(run19);

            tableCell10.Append(tableCellProperties10);
            tableCell10.Append(paragraph13);

            TableCell tableCell11 = new TableCell();

            TableCellProperties tableCellProperties11 = new TableCellProperties();
            TableCellWidth      tableCellWidth11      = new TableCellWidth()
            {
                Width = "3122", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties11.Append(tableCellWidth11);

            Paragraph paragraph14 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00BC57A3", RsidRunAdditionDefault = "00FB1F22"
            };

            Run run20 = new Run();

            RunProperties runProperties10 = new RunProperties();
            NoProof       noProof10       = new NoProof();

            runProperties10.Append(noProof10);
            Text text19 = new Text();

            text19.Text = ii.BirthDay;

            run20.Append(runProperties10);
            run20.Append(text19);

            paragraph14.Append(run20);

            tableCell11.Append(tableCellProperties11);
            tableCell11.Append(paragraph14);

            tableRow6.Append(tableCell10);
            tableRow6.Append(tableCell11);

            TableRow tableRow7 = new TableRow()
            {
                RsidTableRowAddition = "00FB1F22", RsidTableRowProperties = "00731A43"
            };

            TableCell tableCell12 = new TableCell();

            TableCellProperties tableCellProperties12 = new TableCellProperties();
            TableCellWidth      tableCellWidth12      = new TableCellWidth()
            {
                Width = "1435", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties12.Append(tableCellWidth12);

            Paragraph paragraph15 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "006D0F9D", RsidRunAdditionDefault = "00FB1F22"
            };

            Run  run21  = new Run();
            Text text20 = new Text();

            text20.Text = "Anniversary";

            run21.Append(text20);

            paragraph15.Append(run21);

            tableCell12.Append(tableCellProperties12);
            tableCell12.Append(paragraph15);

            TableCell tableCell13 = new TableCell();

            TableCellProperties tableCellProperties13 = new TableCellProperties();
            TableCellWidth      tableCellWidth13      = new TableCellWidth()
            {
                Width = "3122", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties13.Append(tableCellWidth13);
            Paragraph paragraph16 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            paragraph16.Append(new Run(new Text(ii.Anniversary)));

            tableCell13.Append(tableCellProperties13);
            tableCell13.Append(paragraph16);

            tableRow7.Append(tableCell12);
            tableRow7.Append(tableCell13);

            TableRow tableRow8 = new TableRow()
            {
                RsidTableRowAddition = "00FB1F22", RsidTableRowProperties = "00731A43"
            };

            TableCell tableCell14 = new TableCell();

            TableCellProperties tableCellProperties14 = new TableCellProperties();
            TableCellWidth      tableCellWidth14      = new TableCellWidth()
            {
                Width = "1435", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties14.Append(tableCellWidth14);

            Paragraph paragraph17 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            Run  run22  = new Run();
            Text text21 = new Text();

            text21.Text = "Spouse";

            run22.Append(text21);

            paragraph17.Append(run22);

            tableCell14.Append(tableCellProperties14);
            tableCell14.Append(paragraph17);

            TableCell tableCell15 = new TableCell();

            TableCellProperties tableCellProperties15 = new TableCellProperties();
            TableCellWidth      tableCellWidth15      = new TableCellWidth()
            {
                Width = "3122", Type = TableWidthUnitValues.Dxa
            };

            tableCellProperties15.Append(tableCellWidth15);

            Paragraph paragraph18 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00F06304", RsidRunAdditionDefault = "00FB1F22"
            };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            NoProof noProof11 = new NoProof();

            paragraphMarkRunProperties1.Append(noProof11);

            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run23 = new Run();

            RunProperties runProperties11 = new RunProperties();
            NoProof       noProof12       = new NoProof();

            runProperties11.Append(noProof12);
            Text text22 = new Text();

            text22.Text = ii.Spouse;

            run23.Append(runProperties11);
            run23.Append(text22);

            paragraph18.Append(paragraphProperties1);
            paragraph18.Append(run23);

            tableCell15.Append(tableCellProperties15);
            tableCell15.Append(paragraph18);

            tableRow8.Append(tableCell14);
            tableRow8.Append(tableCell15);

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(tableRow2);
            table1.Append(tableRow3);
            table1.Append(tableRow4);
            table1.Append(tableRow5);
            table1.Append(tableRow6);
            table1.Append(tableRow7);
            table1.Append(tableRow8);
            Paragraph paragraph19 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00485B24", RsidRunAdditionDefault = "00FB1F22"
            };

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph1);
            tableCell1.Append(paragraph2);
            if (paragraph2a != null)
            {
                tableCell1.Append(paragraph2a);
            }
            tableCell1.Append(paragraph3);
            tableCell1.Append(paragraph4);
            tableCell1.Append(table1);
            tableCell1.Append(paragraph19);

            TableCell tableCell16 = new TableCell();

            TableCellProperties tableCellProperties16 = new TableCellProperties();
            TableCellWidth      tableCellWidth16      = new TableCellWidth()
            {
                Width = "4788", Type = TableWidthUnitValues.Dxa
            };
            TableCellVerticalAlignment tableCellVerticalAlignment1 = new TableCellVerticalAlignment()
            {
                Val = TableVerticalAlignmentValues.Center
            };

            tableCellProperties16.Append(tableCellWidth16);
            tableCellProperties16.Append(tableCellVerticalAlignment1);
            tableCell16.Append(tableCellProperties16);

            Paragraph paragraph20 = new Paragraph()
            {
                RsidParagraphAddition = "00FB1F22", RsidParagraphProperties = "00960953", RsidRunAdditionDefault = "00FB1F22"
            };
            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            Justification       justification1       = new Justification()
            {
                Val = JustificationValues.Center
            };

            paragraphProperties2.Append(justification1);
            paragraph20.Append(paragraphProperties2);

            if (iid.HasValue())
            {
                Run run24 = new Run();

                RunProperties runProperties12 = new RunProperties();
                NoProof       noProof13       = new NoProof();

                runProperties12.Append(noProof13);

                Drawing drawing1 = new Drawing();

                Wp.Inline inline1 = new Wp.Inline()
                {
                    DistanceFromTop    = (UInt32Value)0U,
                    DistanceFromBottom = (UInt32Value)0U,
                    DistanceFromLeft   = (UInt32Value)0U,
                    DistanceFromRight  = (UInt32Value)0U
                };
                Wp.Extent extent1 = new Wp.Extent()
                {
                    Cx = 1428750L, Cy = 1905000L
                };
                Wp.EffectExtent effectExtent1 = new Wp.EffectExtent()
                {
                    LeftEdge = 0L, TopEdge = 0L, RightEdge = 0L, BottomEdge = 0L
                };
                Wp.DocProperties docProperties1 = new Wp.DocProperties()
                {
                    Id = (UInt32Value)1U, Name = "Picture 1", Description = "D:\\Pictures\\ttt.jpg"
                };

                Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties1 =
                    new Wp.NonVisualGraphicFrameDrawingProperties();

                A.GraphicFrameLocks graphicFrameLocks1 = new A.GraphicFrameLocks()
                {
                    NoChangeAspect = true
                };
                graphicFrameLocks1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");

                nonVisualGraphicFrameDrawingProperties1.Append(graphicFrameLocks1);

                A.Graphic graphic1 = new A.Graphic();
                graphic1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");

                A.GraphicData graphicData1 = new A.GraphicData()
                {
                    Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture"
                };

                Pic.Picture picture1 = new Pic.Picture();
                picture1.AddNamespaceDeclaration("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture");

                Pic.NonVisualPictureProperties nonVisualPictureProperties1 = new Pic.NonVisualPictureProperties();
                Pic.NonVisualDrawingProperties nonVisualDrawingProperties1 = new Pic.NonVisualDrawingProperties()
                {
                    Id          = (UInt32Value)0U,
                    Name        = "Picture 459",
                    Description = "D:\\Pictures\\ttt.jpg"
                };

                Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties1 =
                    new Pic.NonVisualPictureDrawingProperties();
                A.PictureLocks pictureLocks1 = new A.PictureLocks()
                {
                    NoChangeAspect = false, NoChangeArrowheads = true
                };

                nonVisualPictureDrawingProperties1.Append(pictureLocks1);

                nonVisualPictureProperties1.Append(nonVisualDrawingProperties1);
                nonVisualPictureProperties1.Append(nonVisualPictureDrawingProperties1);

                Pic.BlipFill blipFill1 = new Pic.BlipFill();

                A.Blip blip1 = new A.Blip()
                {
                    Embed = iid
                };

                A.BlipExtensionList blipExtensionList1 = new A.BlipExtensionList();

                A.BlipExtension blipExtension1 = new A.BlipExtension()
                {
                    Uri = "{28A0092B-C50C-407E-A947-70E740481C1C}"
                };

                A14.UseLocalDpi useLocalDpi1 = new A14.UseLocalDpi()
                {
                    Val = false
                };
                useLocalDpi1.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main");

                blipExtension1.Append(useLocalDpi1);

                blipExtensionList1.Append(blipExtension1);

                blip1.Append(blipExtensionList1);
                A.SourceRectangle sourceRectangle1 = new A.SourceRectangle();

                A.Stretch       stretch1       = new A.Stretch();
                A.FillRectangle fillRectangle1 = new A.FillRectangle();

                stretch1.Append(fillRectangle1);

                blipFill1.Append(blip1);
                blipFill1.Append(sourceRectangle1);
                blipFill1.Append(stretch1);

                Pic.ShapeProperties shapeProperties1 = new Pic.ShapeProperties()
                {
                    BlackWhiteMode = A.BlackWhiteModeValues.Auto
                };

                A.Transform2D transform2D1 = new A.Transform2D();
                A.Offset      offset1      = new A.Offset()
                {
                    X = 0L, Y = 0L
                };
                A.Extents extents1 = new A.Extents()
                {
                    Cx = 1428750L, Cy = 1905000L
                };

                transform2D1.Append(offset1);
                transform2D1.Append(extents1);

                A.PresetGeometry presetGeometry1 = new A.PresetGeometry()
                {
                    Preset = A.ShapeTypeValues.Rectangle
                };
                A.AdjustValueList adjustValueList1 = new A.AdjustValueList();

                presetGeometry1.Append(adjustValueList1);
                A.NoFill noFill1 = new A.NoFill();

                A.Outline outline1 = new A.Outline();
                A.NoFill  noFill2  = new A.NoFill();

                outline1.Append(noFill2);

                shapeProperties1.Append(transform2D1);
                shapeProperties1.Append(presetGeometry1);
                shapeProperties1.Append(noFill1);
                shapeProperties1.Append(outline1);

                picture1.Append(nonVisualPictureProperties1);
                picture1.Append(blipFill1);
                picture1.Append(shapeProperties1);

                graphicData1.Append(picture1);

                graphic1.Append(graphicData1);

                inline1.Append(extent1);
                inline1.Append(effectExtent1);
                inline1.Append(docProperties1);
                inline1.Append(nonVisualGraphicFrameDrawingProperties1);
                inline1.Append(graphic1);

                drawing1.Append(inline1);

                run24.Append(runProperties12);
                run24.Append(drawing1);

                paragraph20.Append(run24);
            }
            tableCell16.Append(paragraph20);

            BookmarkStart bookmarkStart1 = new BookmarkStart()
            {
                Name = "_GoBack", Id = "0"
            };
            BookmarkEnd bookmarkEnd1 = new BookmarkEnd()
            {
                Id = "0"
            };

            tableRow1.Append(tableRowProperties1);
            tableRow1.Append(tableCell1);
            tableRow1.Append(tableCell16);
            tableRow1.Append(bookmarkStart1);
            tableRow1.Append(bookmarkEnd1);
            return(tableRow1);
        }
コード例 #26
0
ファイル: TestP.cs プロジェクト: ojorma/MariGold.OpenXHTML
        public void AllParagraphProperties()
        {
            using (MemoryStream mem = new MemoryStream())
            {
                WordDocument doc = new WordDocument(mem);

                doc.Process(new HtmlParser("<p style='text-align:center;margin:5px;background-color:#ccc;border:1px solid #000'>test</p>"));

                Assert.IsNotNull(doc.Document.Body);
                Assert.AreEqual(1, doc.Document.Body.ChildElements.Count);

                Paragraph paragraph = doc.Document.Body.ChildElements[0] as Paragraph;
                Assert.IsNotNull(paragraph);
                Assert.AreEqual(2, paragraph.ChildElements.Count);

                ParagraphProperties properties = paragraph.ChildElements[0] as ParagraphProperties;
                Assert.IsNotNull(properties);

                ParagraphBorders paragraphBorders = properties.ChildElements[0] as ParagraphBorders;
                Assert.IsNotNull(paragraphBorders);
                Assert.AreEqual(4, paragraphBorders.ChildElements.Count);

                TopBorder topBorder = paragraphBorders.ChildElements[0] as TopBorder;
                Assert.IsNotNull(topBorder);
                Assert.AreEqual(BorderValues.Single, topBorder.Val.Value);
                Assert.AreEqual("000000", topBorder.Color.Value);
                Assert.AreEqual(1, topBorder.Size.Value);

                LeftBorder leftBorder = paragraphBorders.ChildElements[1] as LeftBorder;
                Assert.IsNotNull(leftBorder);
                Assert.AreEqual(BorderValues.Single, leftBorder.Val.Value);
                Assert.AreEqual("000000", leftBorder.Color.Value);
                Assert.AreEqual(1, leftBorder.Size.Value);

                BottomBorder bottomBorder = paragraphBorders.ChildElements[2] as BottomBorder;
                Assert.IsNotNull(bottomBorder);
                Assert.AreEqual(BorderValues.Single, bottomBorder.Val.Value);
                Assert.AreEqual("000000", bottomBorder.Color.Value);
                Assert.AreEqual(1, bottomBorder.Size.Value);

                RightBorder rightBorder = paragraphBorders.ChildElements[3] as RightBorder;
                Assert.IsNotNull(rightBorder);
                Assert.AreEqual(BorderValues.Single, rightBorder.Val.Value);
                Assert.AreEqual("000000", rightBorder.Color.Value);
                Assert.AreEqual(1, rightBorder.Size.Value);

                Assert.IsNotNull(paragraph.ParagraphProperties.Shading);
                Assert.AreEqual("cccccc", paragraph.ParagraphProperties.Shading.Fill.Value);
                Assert.AreEqual(Word.ShadingPatternValues.Clear, paragraph.ParagraphProperties.Shading.Val.Value);

                SpacingBetweenLines spacing = properties.ChildElements[2] as SpacingBetweenLines;
                Assert.IsNotNull(spacing);
                Assert.AreEqual("100", spacing.Before.Value);

                Indentation ind = properties.ChildElements[3] as Indentation;
                Assert.IsNotNull(ind);
                Assert.AreEqual("100", ind.Left.Value);
                Assert.IsNotNull(ind.Right);
                Assert.AreEqual("100", ind.Right.Value);

                Justification align = properties.ChildElements[4] as Justification;
                Assert.IsNotNull(align);
                Assert.AreEqual(JustificationValues.Center, align.Val.Value);

                Run run = paragraph.ChildElements[1] as Run;
                Assert.IsNotNull(run);
                Assert.AreEqual(2, run.ChildElements.Count);

                RunProperties runProperties = run.ChildElements[0] as RunProperties;
                Assert.IsNotNull(runProperties);
                Assert.AreEqual("cccccc", runProperties.Shading.Fill.Value);

                Word.Text text = run.ChildElements[1] as Word.Text;
                Assert.IsNotNull(text);
                Assert.AreEqual(0, text.ChildElements.Count);
                Assert.AreEqual("test", text.InnerText);

                OpenXmlValidator validator = new OpenXmlValidator();
                var errors = validator.Validate(doc.WordprocessingDocument);
                errors.PrintValidationErrors();
                Assert.AreEqual(0, errors.Count());
            }
        }
コード例 #27
0
            public static void AddStylesToWorkbookPart(WorkbookPart part)
            {
                var workbookStylesPart = part.AddNewPart <WorkbookStylesPart>("WorkbookStyles");

                var stylesheet1 = new Stylesheet {
                    MCAttributes = new MarkupCompatibilityAttributes {
                        Ignorable = "x14ac"
                    }
                };

                stylesheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
                stylesheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");

                var fonts1 = new Fonts {
                    Count = 1U, KnownFonts = true
                };

                var font1     = new Font();
                var fontSize1 = new FontSize {
                    Val = 11D
                };
                var color1 = new Color {
                    Theme = 1U
                };
                var fontName1 = new FontName {
                    Val = "Calibri"
                };
                var fontFamilyNumbering1 = new FontFamilyNumbering {
                    Val = 2
                };
                var fontScheme1 = new FontScheme {
                    Val = FontSchemeValues.Minor
                };

                font1.Append(fontSize1);
                font1.Append(color1);
                font1.Append(fontName1);
                font1.Append(fontFamilyNumbering1);
                font1.Append(fontScheme1);

                fonts1.Append(font1);

                var fills1 = new Fills {
                    Count = 2U
                };

                var fill1        = new Fill();
                var patternFill1 = new PatternFill {
                    PatternType = PatternValues.None
                };

                fill1.Append(patternFill1);

                var fill2        = new Fill();
                var patternFill2 = new PatternFill {
                    PatternType = PatternValues.Gray125
                };

                fill2.Append(patternFill2);

                fills1.Append(fill1);
                fills1.Append(fill2);

                var borders1 = new Borders {
                    Count = 1U
                };

                var border1         = new Border();
                var leftBorder1     = new LeftBorder();
                var rightBorder1    = new RightBorder();
                var topBorder1      = new TopBorder();
                var bottomBorder1   = new BottomBorder();
                var diagonalBorder1 = new DiagonalBorder();

                border1.Append(leftBorder1);
                border1.Append(rightBorder1);
                border1.Append(topBorder1);
                border1.Append(bottomBorder1);
                border1.Append(diagonalBorder1);

                borders1.Append(border1);

                var cellStyleFormats1 = new CellStyleFormats {
                    Count = 1U
                };
                var cellStyleFormat = new CellFormat {
                    NumberFormatId = 0U, FontId = 0U, FillId = 0U, BorderId = 0U
                };

                cellStyleFormats1.Append(cellStyleFormat);

                var cellFormats = new CellFormats {
                    Count = 2U
                };

                // index 0 (default) => unlocked
                var cellFormat0 = new CellFormat {
                    NumberFormatId = 0U, FontId = 0U, FillId = 0U, BorderId = 0U, FormatId = 0U, ApplyProtection = true
                }.AppendItem(new Protection {
                    Locked = false
                });
                // index 1 => locked
                var cellFormat1 = new CellFormat {
                    NumberFormatId = 0U, FontId = 0U, FillId = 0U, BorderId = 0U, FormatId = 0U
                };

                cellFormats.Append(cellFormat0);
                cellFormats.Append(cellFormat1);

                var cellStyles1 = new CellStyles {
                    Count = 1U
                };
                var cellStyle1 = new CellStyle {
                    Name = "Normal", FormatId = 0U, BuiltinId = 0U
                };

                cellStyles1.Append(cellStyle1);

                stylesheet1.Append(fonts1);
                stylesheet1.Append(fills1);
                stylesheet1.Append(borders1);
                stylesheet1.Append(cellStyleFormats1);
                stylesheet1.Append(cellFormats);
                stylesheet1.Append(cellStyles1);

                workbookStylesPart.Stylesheet = stylesheet1;
            }
コード例 #28
0
        public SpreadsheetStylesManager(WorkbookPart workbookPart)
        {
            _workbookPart = workbookPart;
            _styles       = new Dictionary <string, int>();
            _fonts        = new Dictionary <FontKey, int>();
            _fills        = new Dictionary <System.Drawing.Color, int>();

            var stylesPart = _workbookPart.AddNewPart <WorkbookStylesPart>();

            _stylesheet           = new Stylesheet();
            stylesPart.Stylesheet = _stylesheet;

            _stylesheet.Fills = new Fills();
            _stylesheet.Fills.AppendChild(new Fill {
                PatternFill = new PatternFill {
                    PatternType = PatternValues.None
                }
            });                                                                                                             // required, reserved by Excel
            _stylesheet.Fills.AppendChild(new Fill {
                PatternFill = new PatternFill {
                    PatternType = PatternValues.Gray125
                }
            });                                                                                                                // required, reserved by Excel
            _stylesheet.Fills.Count = 2;

            stylesPart.Stylesheet.Fonts       = new Fonts();
            stylesPart.Stylesheet.Fonts.Count = 2;
            stylesPart.Stylesheet.Fonts.AppendChild(new Font());

            Font      hyperLinkFont = new Font();
            Underline underline1    = new Underline();
            FontSize  fontSize2     = new FontSize()
            {
                Val = 11D
            };
            Color color2 = new Color()
            {
                Theme = (UInt32Value)10U
            };
            FontName fontName2 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering2 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontCharSet fontCharSet2 = new FontCharSet()
            {
                Val = 238
            };
            FontScheme fontScheme2 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            hyperLinkFont.Append(underline1);
            hyperLinkFont.Append(fontSize2);
            hyperLinkFont.Append(color2);
            hyperLinkFont.Append(fontName2);
            hyperLinkFont.Append(fontFamilyNumbering2);
            hyperLinkFont.Append(fontCharSet2);
            hyperLinkFont.Append(fontScheme2);
            stylesPart.Stylesheet.Fonts.AppendChild(hyperLinkFont);

            stylesPart.Stylesheet.Borders       = new Borders();
            stylesPart.Stylesheet.Borders.Count = 1;
            stylesPart.Stylesheet.Borders.AppendChild(new Border());

            stylesPart.Stylesheet.CellStyleFormats       = new CellStyleFormats();
            stylesPart.Stylesheet.CellStyleFormats.Count = 2;
            stylesPart.Stylesheet.CellStyleFormats.AppendChild(new CellFormat());

            stylesPart.Stylesheet.CellFormats = new CellFormats();
            // empty one for index 0, seems to be required
            stylesPart.Stylesheet.CellFormats.AppendChild(new CellFormat());
            CellFormat hyperLinkFormt = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)1U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, ApplyNumberFormat = false, ApplyFill = false, ApplyBorder = false, ApplyAlignment = false, ApplyProtection = false
            };

            stylesPart.Stylesheet.CellFormats.AppendChild(hyperLinkFormt);
            stylesPart.Stylesheet.CellFormats.Count = 2;
            _hyperlinkStyles[new SpreadsheetStyle().GetIdentifier()] = 1;


            Borders borders = new Borders()
            {
                Count = (UInt32Value)1U
            };
            Border         border         = new Border();
            LeftBorder     leftBorder     = new LeftBorder();
            RightBorder    rightBorder    = new RightBorder();
            TopBorder      topBorder      = new TopBorder();
            BottomBorder   bottomBorder   = new BottomBorder();
            DiagonalBorder diagonalBorder = new DiagonalBorder();

            border.AppendChild(leftBorder);
            border.AppendChild(rightBorder);
            border.AppendChild(topBorder);
            border.AppendChild(bottomBorder);
            border.AppendChild(diagonalBorder);
            borders.AppendChild(border);

            _stylesheet.Borders = borders;

            CellStyles cellStyles = new CellStyles()
            {
                Count = (UInt32Value)1U
            };
            CellStyle cellStyle = new CellStyle()
            {
                Name = "Normal", FormatId = (UInt32Value)0U, BuiltinId = (UInt32Value)0U
            };

            cellStyles.AppendChild(cellStyle);
            _stylesheet.CellStyles = cellStyles;

            var dateTimeFormatInfo = DateTimeFormatInfo.CurrentInfo;
            var dateTimeFormat     = "d.mm.yyyy hh:mm:ss";

            if (dateTimeFormatInfo != null)
            {
                dateTimeFormat = dateTimeFormatInfo.ShortDatePattern + " " + dateTimeFormatInfo.LongTimePattern;
                dateTimeFormat = dateTimeFormat.Replace("/", "\\/");
                dateTimeFormat = dateTimeFormat.Replace("tt", "AM/PM");
            }
            NumberingFormats numberingFormats = new NumberingFormats()
            {
                Count = (UInt32Value)1U
            };
            NumberingFormat numberingFormat1 = new NumberingFormat()
            {
                NumberFormatId = (UInt32Value)164U, FormatCode = dateTimeFormat
            };

            numberingFormats.Append(numberingFormat1);

            _stylesheet.NumberingFormats = numberingFormats;
        }
コード例 #29
0
ファイル: TableStyles.cs プロジェクト: kurapica/doc2web
        // Creates an Style instance and adds its children.
        public static Style GenerateStyle2()
        {
            Style style1 = new Style()
            {
                Type = StyleValues.Table, StyleId = "TableGrid"
            };
            StyleName styleName1 = new StyleName()
            {
                Val = "Table Grid"
            };
            BasedOn basedOn1 = new BasedOn()
            {
                Val = "TableNormal"
            };
            UIPriority uIPriority1 = new UIPriority()
            {
                Val = 39
            };
            Rsid rsid1 = new Rsid()
            {
                Val = "00BE1E98"
            };

            StyleParagraphProperties styleParagraphProperties1 = new StyleParagraphProperties();
            SpacingBetweenLines      spacingBetweenLines1      = new SpacingBetweenLines()
            {
                After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto
            };

            styleParagraphProperties1.Append(spacingBetweenLines1);

            StyleTableProperties styleTableProperties1 = new StyleTableProperties();

            TableBorders tableBorders1 = new TableBorders();
            TopBorder    topBorder1    = new TopBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = 4U, Space = 0U
            };
            LeftBorder leftBorder1 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = 4U, Space = 0U
            };
            BottomBorder bottomBorder1 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = 4U, Space = 0U
            };
            RightBorder rightBorder1 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = 4U, Space = 0U
            };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = 4U, Space = 0U
            };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = 4U, Space = 0U
            };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);

            styleTableProperties1.Append(tableBorders1);

            style1.Append(styleName1);
            style1.Append(basedOn1);
            style1.Append(uIPriority1);
            style1.Append(rsid1);
            style1.Append(styleParagraphProperties1);
            style1.Append(styleTableProperties1);
            return(style1);
        }
コード例 #30
0
ファイル: HardCode.cs プロジェクト: silmarion/WPDHelper
        private void GenerateChapterTen()
        {
            var paragraph1 = new Paragraph();
            var paraProp = GetParagraphProperties("Header1");
            var run = new Run();
            run.Append(new Text("10. Лист регистрации изменений, вносимых в РПД дисциплины"));

            paragraph1.Append(paraProp);
            paragraph1.Append(run);

            Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00E24EED", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Line = "360", LineRule = LineSpacingRuleValues.Auto };
            Indentation indentation1 = new Indentation() { Left = "360" };
            Justification justification1 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            RunFonts runFonts7 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize1 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "28" };
            Languages languages7 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties2.Append(runFonts7);
            paragraphMarkRunProperties2.Append(fontSize1);
            paragraphMarkRunProperties2.Append(fontSizeComplexScript1);
            paragraphMarkRunProperties2.Append(languages7);

            paragraphProperties2.Append(spacingBetweenLines1);
            paragraphProperties2.Append(indentation1);
            paragraphProperties2.Append(justification1);
            paragraphProperties2.Append(paragraphMarkRunProperties2);

            paragraph2.Append(paragraphProperties2);

            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableWidth tableWidth1 = new TableWidth() { Width = "9807", Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);
            TableLook tableLook1 = new TableLook() { Val = "01E0", FirstRow = true, LastRow = true, FirstColumn = true, LastColumn = true, NoHorizontalBand = false, NoVerticalBand = false };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableLook1);

            TableGrid tableGrid1 = new TableGrid();
            GridColumn gridColumn1 = new GridColumn() { Width = "1565" };
            GridColumn gridColumn2 = new GridColumn() { Width = "1066" };
            GridColumn gridColumn3 = new GridColumn() { Width = "1917" };
            GridColumn gridColumn4 = new GridColumn() { Width = "5259" };

            tableGrid1.Append(gridColumn1);
            tableGrid1.Append(gridColumn2);
            tableGrid1.Append(gridColumn3);
            tableGrid1.Append(gridColumn4);

            TableRow tableRow1 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties1.Append(tableCellWidth1);

            Paragraph paragraph3 = new Paragraph() { RsidParagraphMarkRevision = "00512F8B", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties3 = new ParagraphProperties();
            Justification justification2 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties3 = new ParagraphMarkRunProperties();
            RunFonts runFonts8 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold1 = new Bold();
            FontSize fontSize2 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" };
            Languages languages8 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties3.Append(runFonts8);
            paragraphMarkRunProperties3.Append(bold1);
            paragraphMarkRunProperties3.Append(fontSize2);
            paragraphMarkRunProperties3.Append(fontSizeComplexScript2);
            paragraphMarkRunProperties3.Append(languages8);

            paragraphProperties3.Append(justification2);
            paragraphProperties3.Append(paragraphMarkRunProperties3);

            Run run6 = new Run() { RsidRunProperties = "00512F8B" };

            RunProperties runProperties6 = new RunProperties();
            RunFonts runFonts9 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold2 = new Bold();
            FontSize fontSize3 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "28" };
            Languages languages9 = new Languages() { Val = "ru-RU" };

            runProperties6.Append(runFonts9);
            runProperties6.Append(bold2);
            runProperties6.Append(fontSize3);
            runProperties6.Append(fontSizeComplexScript3);
            runProperties6.Append(languages9);
            Text text5 = new Text();
            text5.Text = "№ изменения";

            run6.Append(runProperties6);
            run6.Append(text5);

            paragraph3.Append(paragraphProperties3);
            paragraph3.Append(run6);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph3);

            TableCell tableCell2 = new TableCell();

            TableCellProperties tableCellProperties2 = new TableCellProperties();
            TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties2.Append(tableCellWidth2);

            Paragraph paragraph4 = new Paragraph() { RsidParagraphMarkRevision = "00512F8B", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties4 = new ParagraphProperties();
            Justification justification3 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties4 = new ParagraphMarkRunProperties();
            RunFonts runFonts10 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold3 = new Bold();
            FontSize fontSize4 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "28" };
            Languages languages10 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties4.Append(runFonts10);
            paragraphMarkRunProperties4.Append(bold3);
            paragraphMarkRunProperties4.Append(fontSize4);
            paragraphMarkRunProperties4.Append(fontSizeComplexScript4);
            paragraphMarkRunProperties4.Append(languages10);

            paragraphProperties4.Append(justification3);
            paragraphProperties4.Append(paragraphMarkRunProperties4);

            Run run7 = new Run() { RsidRunProperties = "00512F8B" };

            RunProperties runProperties7 = new RunProperties();
            RunFonts runFonts11 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold4 = new Bold();
            FontSize fontSize5 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "28" };
            Languages languages11 = new Languages() { Val = "ru-RU" };

            runProperties7.Append(runFonts11);
            runProperties7.Append(bold4);
            runProperties7.Append(fontSize5);
            runProperties7.Append(fontSizeComplexScript5);
            runProperties7.Append(languages11);
            Text text6 = new Text();
            text6.Text = "дата";

            run7.Append(runProperties7);
            run7.Append(text6);

            paragraph4.Append(paragraphProperties4);
            paragraph4.Append(run7);

            tableCell2.Append(tableCellProperties2);
            tableCell2.Append(paragraph4);

            TableCell tableCell3 = new TableCell();

            TableCellProperties tableCellProperties3 = new TableCellProperties();
            TableCellWidth tableCellWidth3 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties3.Append(tableCellWidth3);

            Paragraph paragraph5 = new Paragraph() { RsidParagraphMarkRevision = "00512F8B", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties5 = new ParagraphProperties();
            Justification justification4 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties5 = new ParagraphMarkRunProperties();
            RunFonts runFonts12 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold5 = new Bold();
            FontSize fontSize6 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "28" };
            Languages languages12 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties5.Append(runFonts12);
            paragraphMarkRunProperties5.Append(bold5);
            paragraphMarkRunProperties5.Append(fontSize6);
            paragraphMarkRunProperties5.Append(fontSizeComplexScript6);
            paragraphMarkRunProperties5.Append(languages12);

            paragraphProperties5.Append(justification4);
            paragraphProperties5.Append(paragraphMarkRunProperties5);

            Run run8 = new Run() { RsidRunProperties = "00512F8B" };

            RunProperties runProperties8 = new RunProperties();
            RunFonts runFonts13 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold6 = new Bold();
            FontSize fontSize7 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "28" };
            Languages languages13 = new Languages() { Val = "ru-RU" };

            runProperties8.Append(runFonts13);
            runProperties8.Append(bold6);
            runProperties8.Append(fontSize7);
            runProperties8.Append(fontSizeComplexScript7);
            runProperties8.Append(languages13);
            Text text7 = new Text();
            text7.Text = "Страницы с изменениями";

            run8.Append(runProperties8);
            run8.Append(text7);

            paragraph5.Append(paragraphProperties5);
            paragraph5.Append(run8);

            tableCell3.Append(tableCellProperties3);
            tableCell3.Append(paragraph5);

            TableCell tableCell4 = new TableCell();

            TableCellProperties tableCellProperties4 = new TableCellProperties();
            TableCellWidth tableCellWidth4 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties4.Append(tableCellWidth4);

            Paragraph paragraph6 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties6 = new ParagraphProperties();
            Justification justification5 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties6 = new ParagraphMarkRunProperties();
            RunFonts runFonts14 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold7 = new Bold();
            FontSize fontSize8 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "28" };
            Languages languages14 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties6.Append(runFonts14);
            paragraphMarkRunProperties6.Append(bold7);
            paragraphMarkRunProperties6.Append(fontSize8);
            paragraphMarkRunProperties6.Append(fontSizeComplexScript8);
            paragraphMarkRunProperties6.Append(languages14);

            paragraphProperties6.Append(justification5);
            paragraphProperties6.Append(paragraphMarkRunProperties6);

            Run run9 = new Run() { RsidRunProperties = "00B65E2F" };

            RunProperties runProperties9 = new RunProperties();
            RunFonts runFonts15 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold8 = new Bold();
            FontSize fontSize9 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript9 = new FontSizeComplexScript() { Val = "28" };
            Languages languages15 = new Languages() { Val = "ru-RU" };

            runProperties9.Append(runFonts15);
            runProperties9.Append(bold8);
            runProperties9.Append(fontSize9);
            runProperties9.Append(fontSizeComplexScript9);
            runProperties9.Append(languages15);
            Text text8 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text8.Text = "Перечень и содержание откорректированных разделов ";

            run9.Append(runProperties9);
            run9.Append(text8);

            Run run10 = new Run();

            RunProperties runProperties10 = new RunProperties();
            RunFonts runFonts16 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold9 = new Bold();
            FontSize fontSize10 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript10 = new FontSizeComplexScript() { Val = "28" };
            Languages languages16 = new Languages() { Val = "ru-RU" };

            runProperties10.Append(runFonts16);
            runProperties10.Append(bold9);
            runProperties10.Append(fontSize10);
            runProperties10.Append(fontSizeComplexScript10);
            runProperties10.Append(languages16);
            Text text9 = new Text();
            text9.Text = "РПД";

            run10.Append(runProperties10);
            run10.Append(text9);

            paragraph6.Append(paragraphProperties6);
            paragraph6.Append(run9);
            paragraph6.Append(run10);

            tableCell4.Append(tableCellProperties4);
            tableCell4.Append(paragraph6);

            tableRow1.Append(tableCell1);
            tableRow1.Append(tableCell2);
            tableRow1.Append(tableCell3);
            tableRow1.Append(tableCell4);

            TableRow tableRow2 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell5 = new TableCell();

            TableCellProperties tableCellProperties5 = new TableCellProperties();
            TableCellWidth tableCellWidth5 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties5.Append(tableCellWidth5);

            Paragraph paragraph7 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties7 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification6 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties7 = new ParagraphMarkRunProperties();
            RunFonts runFonts17 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize11 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript11 = new FontSizeComplexScript() { Val = "28" };
            Languages languages17 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties7.Append(runFonts17);
            paragraphMarkRunProperties7.Append(fontSize11);
            paragraphMarkRunProperties7.Append(fontSizeComplexScript11);
            paragraphMarkRunProperties7.Append(languages17);

            paragraphProperties7.Append(spacingBetweenLines2);
            paragraphProperties7.Append(justification6);
            paragraphProperties7.Append(paragraphMarkRunProperties7);

            paragraph7.Append(paragraphProperties7);

            tableCell5.Append(tableCellProperties5);
            tableCell5.Append(paragraph7);

            TableCell tableCell6 = new TableCell();

            TableCellProperties tableCellProperties6 = new TableCellProperties();
            TableCellWidth tableCellWidth6 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties6.Append(tableCellWidth6);

            Paragraph paragraph8 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties8 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification7 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties8 = new ParagraphMarkRunProperties();
            RunFonts runFonts18 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize12 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript12 = new FontSizeComplexScript() { Val = "28" };
            Languages languages18 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties8.Append(runFonts18);
            paragraphMarkRunProperties8.Append(fontSize12);
            paragraphMarkRunProperties8.Append(fontSizeComplexScript12);
            paragraphMarkRunProperties8.Append(languages18);

            paragraphProperties8.Append(spacingBetweenLines3);
            paragraphProperties8.Append(justification7);
            paragraphProperties8.Append(paragraphMarkRunProperties8);

            paragraph8.Append(paragraphProperties8);

            tableCell6.Append(tableCellProperties6);
            tableCell6.Append(paragraph8);

            TableCell tableCell7 = new TableCell();

            TableCellProperties tableCellProperties7 = new TableCellProperties();
            TableCellWidth tableCellWidth7 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties7.Append(tableCellWidth7);

            Paragraph paragraph9 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties9 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines4 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification8 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties9 = new ParagraphMarkRunProperties();
            RunFonts runFonts19 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize13 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript13 = new FontSizeComplexScript() { Val = "28" };
            Languages languages19 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties9.Append(runFonts19);
            paragraphMarkRunProperties9.Append(fontSize13);
            paragraphMarkRunProperties9.Append(fontSizeComplexScript13);
            paragraphMarkRunProperties9.Append(languages19);

            paragraphProperties9.Append(spacingBetweenLines4);
            paragraphProperties9.Append(justification8);
            paragraphProperties9.Append(paragraphMarkRunProperties9);

            paragraph9.Append(paragraphProperties9);

            tableCell7.Append(tableCellProperties7);
            tableCell7.Append(paragraph9);

            TableCell tableCell8 = new TableCell();

            TableCellProperties tableCellProperties8 = new TableCellProperties();
            TableCellWidth tableCellWidth8 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties8.Append(tableCellWidth8);

            Paragraph paragraph10 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties10 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines5 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification9 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties10 = new ParagraphMarkRunProperties();
            RunFonts runFonts20 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize14 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript14 = new FontSizeComplexScript() { Val = "28" };
            Languages languages20 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties10.Append(runFonts20);
            paragraphMarkRunProperties10.Append(fontSize14);
            paragraphMarkRunProperties10.Append(fontSizeComplexScript14);
            paragraphMarkRunProperties10.Append(languages20);

            paragraphProperties10.Append(spacingBetweenLines5);
            paragraphProperties10.Append(justification9);
            paragraphProperties10.Append(paragraphMarkRunProperties10);

            paragraph10.Append(paragraphProperties10);

            tableCell8.Append(tableCellProperties8);
            tableCell8.Append(paragraph10);

            tableRow2.Append(tableCell5);
            tableRow2.Append(tableCell6);
            tableRow2.Append(tableCell7);
            tableRow2.Append(tableCell8);

            TableRow tableRow3 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell9 = new TableCell();

            TableCellProperties tableCellProperties9 = new TableCellProperties();
            TableCellWidth tableCellWidth9 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties9.Append(tableCellWidth9);

            Paragraph paragraph11 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties11 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines6 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification10 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties11 = new ParagraphMarkRunProperties();
            RunFonts runFonts21 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize15 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript15 = new FontSizeComplexScript() { Val = "28" };
            Languages languages21 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties11.Append(runFonts21);
            paragraphMarkRunProperties11.Append(fontSize15);
            paragraphMarkRunProperties11.Append(fontSizeComplexScript15);
            paragraphMarkRunProperties11.Append(languages21);

            paragraphProperties11.Append(spacingBetweenLines6);
            paragraphProperties11.Append(justification10);
            paragraphProperties11.Append(paragraphMarkRunProperties11);

            paragraph11.Append(paragraphProperties11);

            tableCell9.Append(tableCellProperties9);
            tableCell9.Append(paragraph11);

            TableCell tableCell10 = new TableCell();

            TableCellProperties tableCellProperties10 = new TableCellProperties();
            TableCellWidth tableCellWidth10 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties10.Append(tableCellWidth10);

            Paragraph paragraph12 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties12 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines7 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification11 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties12 = new ParagraphMarkRunProperties();
            RunFonts runFonts22 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize16 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript16 = new FontSizeComplexScript() { Val = "28" };
            Languages languages22 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties12.Append(runFonts22);
            paragraphMarkRunProperties12.Append(fontSize16);
            paragraphMarkRunProperties12.Append(fontSizeComplexScript16);
            paragraphMarkRunProperties12.Append(languages22);

            paragraphProperties12.Append(spacingBetweenLines7);
            paragraphProperties12.Append(justification11);
            paragraphProperties12.Append(paragraphMarkRunProperties12);

            paragraph12.Append(paragraphProperties12);

            tableCell10.Append(tableCellProperties10);
            tableCell10.Append(paragraph12);

            TableCell tableCell11 = new TableCell();

            TableCellProperties tableCellProperties11 = new TableCellProperties();
            TableCellWidth tableCellWidth11 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties11.Append(tableCellWidth11);

            Paragraph paragraph13 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties13 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines8 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification12 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties13 = new ParagraphMarkRunProperties();
            RunFonts runFonts23 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize17 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript17 = new FontSizeComplexScript() { Val = "28" };
            Languages languages23 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties13.Append(runFonts23);
            paragraphMarkRunProperties13.Append(fontSize17);
            paragraphMarkRunProperties13.Append(fontSizeComplexScript17);
            paragraphMarkRunProperties13.Append(languages23);

            paragraphProperties13.Append(spacingBetweenLines8);
            paragraphProperties13.Append(justification12);
            paragraphProperties13.Append(paragraphMarkRunProperties13);

            paragraph13.Append(paragraphProperties13);

            tableCell11.Append(tableCellProperties11);
            tableCell11.Append(paragraph13);

            TableCell tableCell12 = new TableCell();

            TableCellProperties tableCellProperties12 = new TableCellProperties();
            TableCellWidth tableCellWidth12 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties12.Append(tableCellWidth12);

            Paragraph paragraph14 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties14 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines9 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification13 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties14 = new ParagraphMarkRunProperties();
            RunFonts runFonts24 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize18 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript18 = new FontSizeComplexScript() { Val = "28" };
            Languages languages24 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties14.Append(runFonts24);
            paragraphMarkRunProperties14.Append(fontSize18);
            paragraphMarkRunProperties14.Append(fontSizeComplexScript18);
            paragraphMarkRunProperties14.Append(languages24);

            paragraphProperties14.Append(spacingBetweenLines9);
            paragraphProperties14.Append(justification13);
            paragraphProperties14.Append(paragraphMarkRunProperties14);

            paragraph14.Append(paragraphProperties14);

            tableCell12.Append(tableCellProperties12);
            tableCell12.Append(paragraph14);

            tableRow3.Append(tableCell9);
            tableRow3.Append(tableCell10);
            tableRow3.Append(tableCell11);
            tableRow3.Append(tableCell12);

            TableRow tableRow4 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell13 = new TableCell();

            TableCellProperties tableCellProperties13 = new TableCellProperties();
            TableCellWidth tableCellWidth13 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties13.Append(tableCellWidth13);

            Paragraph paragraph15 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties15 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines10 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification14 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties15 = new ParagraphMarkRunProperties();
            RunFonts runFonts25 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize19 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript19 = new FontSizeComplexScript() { Val = "28" };
            Languages languages25 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties15.Append(runFonts25);
            paragraphMarkRunProperties15.Append(fontSize19);
            paragraphMarkRunProperties15.Append(fontSizeComplexScript19);
            paragraphMarkRunProperties15.Append(languages25);

            paragraphProperties15.Append(spacingBetweenLines10);
            paragraphProperties15.Append(justification14);
            paragraphProperties15.Append(paragraphMarkRunProperties15);

            paragraph15.Append(paragraphProperties15);

            tableCell13.Append(tableCellProperties13);
            tableCell13.Append(paragraph15);

            TableCell tableCell14 = new TableCell();

            TableCellProperties tableCellProperties14 = new TableCellProperties();
            TableCellWidth tableCellWidth14 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties14.Append(tableCellWidth14);

            Paragraph paragraph16 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties16 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines11 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification15 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties16 = new ParagraphMarkRunProperties();
            RunFonts runFonts26 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize20 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript20 = new FontSizeComplexScript() { Val = "28" };
            Languages languages26 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties16.Append(runFonts26);
            paragraphMarkRunProperties16.Append(fontSize20);
            paragraphMarkRunProperties16.Append(fontSizeComplexScript20);
            paragraphMarkRunProperties16.Append(languages26);

            paragraphProperties16.Append(spacingBetweenLines11);
            paragraphProperties16.Append(justification15);
            paragraphProperties16.Append(paragraphMarkRunProperties16);

            paragraph16.Append(paragraphProperties16);

            tableCell14.Append(tableCellProperties14);
            tableCell14.Append(paragraph16);

            TableCell tableCell15 = new TableCell();

            TableCellProperties tableCellProperties15 = new TableCellProperties();
            TableCellWidth tableCellWidth15 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties15.Append(tableCellWidth15);

            Paragraph paragraph17 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties17 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines12 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification16 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties17 = new ParagraphMarkRunProperties();
            RunFonts runFonts27 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize21 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript21 = new FontSizeComplexScript() { Val = "28" };
            Languages languages27 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties17.Append(runFonts27);
            paragraphMarkRunProperties17.Append(fontSize21);
            paragraphMarkRunProperties17.Append(fontSizeComplexScript21);
            paragraphMarkRunProperties17.Append(languages27);

            paragraphProperties17.Append(spacingBetweenLines12);
            paragraphProperties17.Append(justification16);
            paragraphProperties17.Append(paragraphMarkRunProperties17);

            paragraph17.Append(paragraphProperties17);

            tableCell15.Append(tableCellProperties15);
            tableCell15.Append(paragraph17);

            TableCell tableCell16 = new TableCell();

            TableCellProperties tableCellProperties16 = new TableCellProperties();
            TableCellWidth tableCellWidth16 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties16.Append(tableCellWidth16);

            Paragraph paragraph18 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties18 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines13 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification17 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties18 = new ParagraphMarkRunProperties();
            RunFonts runFonts28 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize22 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript22 = new FontSizeComplexScript() { Val = "28" };
            Languages languages28 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties18.Append(runFonts28);
            paragraphMarkRunProperties18.Append(fontSize22);
            paragraphMarkRunProperties18.Append(fontSizeComplexScript22);
            paragraphMarkRunProperties18.Append(languages28);

            paragraphProperties18.Append(spacingBetweenLines13);
            paragraphProperties18.Append(justification17);
            paragraphProperties18.Append(paragraphMarkRunProperties18);

            paragraph18.Append(paragraphProperties18);

            tableCell16.Append(tableCellProperties16);
            tableCell16.Append(paragraph18);

            tableRow4.Append(tableCell13);
            tableRow4.Append(tableCell14);
            tableRow4.Append(tableCell15);
            tableRow4.Append(tableCell16);

            TableRow tableRow5 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell17 = new TableCell();

            TableCellProperties tableCellProperties17 = new TableCellProperties();
            TableCellWidth tableCellWidth17 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties17.Append(tableCellWidth17);

            Paragraph paragraph19 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties19 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines14 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification18 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties19 = new ParagraphMarkRunProperties();
            RunFonts runFonts29 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize23 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript23 = new FontSizeComplexScript() { Val = "28" };
            Languages languages29 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties19.Append(runFonts29);
            paragraphMarkRunProperties19.Append(fontSize23);
            paragraphMarkRunProperties19.Append(fontSizeComplexScript23);
            paragraphMarkRunProperties19.Append(languages29);

            paragraphProperties19.Append(spacingBetweenLines14);
            paragraphProperties19.Append(justification18);
            paragraphProperties19.Append(paragraphMarkRunProperties19);

            paragraph19.Append(paragraphProperties19);

            tableCell17.Append(tableCellProperties17);
            tableCell17.Append(paragraph19);

            TableCell tableCell18 = new TableCell();

            TableCellProperties tableCellProperties18 = new TableCellProperties();
            TableCellWidth tableCellWidth18 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties18.Append(tableCellWidth18);

            Paragraph paragraph20 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties20 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines15 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification19 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties20 = new ParagraphMarkRunProperties();
            RunFonts runFonts30 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize24 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript24 = new FontSizeComplexScript() { Val = "28" };
            Languages languages30 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties20.Append(runFonts30);
            paragraphMarkRunProperties20.Append(fontSize24);
            paragraphMarkRunProperties20.Append(fontSizeComplexScript24);
            paragraphMarkRunProperties20.Append(languages30);

            paragraphProperties20.Append(spacingBetweenLines15);
            paragraphProperties20.Append(justification19);
            paragraphProperties20.Append(paragraphMarkRunProperties20);

            paragraph20.Append(paragraphProperties20);

            tableCell18.Append(tableCellProperties18);
            tableCell18.Append(paragraph20);

            TableCell tableCell19 = new TableCell();

            TableCellProperties tableCellProperties19 = new TableCellProperties();
            TableCellWidth tableCellWidth19 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties19.Append(tableCellWidth19);

            Paragraph paragraph21 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties21 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines16 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification20 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties21 = new ParagraphMarkRunProperties();
            RunFonts runFonts31 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize25 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript25 = new FontSizeComplexScript() { Val = "28" };
            Languages languages31 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties21.Append(runFonts31);
            paragraphMarkRunProperties21.Append(fontSize25);
            paragraphMarkRunProperties21.Append(fontSizeComplexScript25);
            paragraphMarkRunProperties21.Append(languages31);

            paragraphProperties21.Append(spacingBetweenLines16);
            paragraphProperties21.Append(justification20);
            paragraphProperties21.Append(paragraphMarkRunProperties21);

            paragraph21.Append(paragraphProperties21);

            tableCell19.Append(tableCellProperties19);
            tableCell19.Append(paragraph21);

            TableCell tableCell20 = new TableCell();

            TableCellProperties tableCellProperties20 = new TableCellProperties();
            TableCellWidth tableCellWidth20 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties20.Append(tableCellWidth20);

            Paragraph paragraph22 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties22 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines17 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification21 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties22 = new ParagraphMarkRunProperties();
            RunFonts runFonts32 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize26 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript26 = new FontSizeComplexScript() { Val = "28" };
            Languages languages32 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties22.Append(runFonts32);
            paragraphMarkRunProperties22.Append(fontSize26);
            paragraphMarkRunProperties22.Append(fontSizeComplexScript26);
            paragraphMarkRunProperties22.Append(languages32);

            paragraphProperties22.Append(spacingBetweenLines17);
            paragraphProperties22.Append(justification21);
            paragraphProperties22.Append(paragraphMarkRunProperties22);

            paragraph22.Append(paragraphProperties22);

            tableCell20.Append(tableCellProperties20);
            tableCell20.Append(paragraph22);

            tableRow5.Append(tableCell17);
            tableRow5.Append(tableCell18);
            tableRow5.Append(tableCell19);
            tableRow5.Append(tableCell20);

            TableRow tableRow6 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell21 = new TableCell();

            TableCellProperties tableCellProperties21 = new TableCellProperties();
            TableCellWidth tableCellWidth21 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties21.Append(tableCellWidth21);

            Paragraph paragraph23 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties23 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines18 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification22 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties23 = new ParagraphMarkRunProperties();
            RunFonts runFonts33 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize27 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript27 = new FontSizeComplexScript() { Val = "28" };
            Languages languages33 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties23.Append(runFonts33);
            paragraphMarkRunProperties23.Append(fontSize27);
            paragraphMarkRunProperties23.Append(fontSizeComplexScript27);
            paragraphMarkRunProperties23.Append(languages33);

            paragraphProperties23.Append(spacingBetweenLines18);
            paragraphProperties23.Append(justification22);
            paragraphProperties23.Append(paragraphMarkRunProperties23);

            paragraph23.Append(paragraphProperties23);

            tableCell21.Append(tableCellProperties21);
            tableCell21.Append(paragraph23);

            TableCell tableCell22 = new TableCell();

            TableCellProperties tableCellProperties22 = new TableCellProperties();
            TableCellWidth tableCellWidth22 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties22.Append(tableCellWidth22);

            Paragraph paragraph24 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties24 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines19 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification23 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties24 = new ParagraphMarkRunProperties();
            RunFonts runFonts34 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize28 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript28 = new FontSizeComplexScript() { Val = "28" };
            Languages languages34 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties24.Append(runFonts34);
            paragraphMarkRunProperties24.Append(fontSize28);
            paragraphMarkRunProperties24.Append(fontSizeComplexScript28);
            paragraphMarkRunProperties24.Append(languages34);

            paragraphProperties24.Append(spacingBetweenLines19);
            paragraphProperties24.Append(justification23);
            paragraphProperties24.Append(paragraphMarkRunProperties24);

            paragraph24.Append(paragraphProperties24);

            tableCell22.Append(tableCellProperties22);
            tableCell22.Append(paragraph24);

            TableCell tableCell23 = new TableCell();

            TableCellProperties tableCellProperties23 = new TableCellProperties();
            TableCellWidth tableCellWidth23 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties23.Append(tableCellWidth23);

            Paragraph paragraph25 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties25 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines20 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification24 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties25 = new ParagraphMarkRunProperties();
            RunFonts runFonts35 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize29 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript29 = new FontSizeComplexScript() { Val = "28" };
            Languages languages35 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties25.Append(runFonts35);
            paragraphMarkRunProperties25.Append(fontSize29);
            paragraphMarkRunProperties25.Append(fontSizeComplexScript29);
            paragraphMarkRunProperties25.Append(languages35);

            paragraphProperties25.Append(spacingBetweenLines20);
            paragraphProperties25.Append(justification24);
            paragraphProperties25.Append(paragraphMarkRunProperties25);

            paragraph25.Append(paragraphProperties25);

            tableCell23.Append(tableCellProperties23);
            tableCell23.Append(paragraph25);

            TableCell tableCell24 = new TableCell();

            TableCellProperties tableCellProperties24 = new TableCellProperties();
            TableCellWidth tableCellWidth24 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties24.Append(tableCellWidth24);

            Paragraph paragraph26 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties26 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines21 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification25 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties26 = new ParagraphMarkRunProperties();
            RunFonts runFonts36 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize30 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript30 = new FontSizeComplexScript() { Val = "28" };
            Languages languages36 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties26.Append(runFonts36);
            paragraphMarkRunProperties26.Append(fontSize30);
            paragraphMarkRunProperties26.Append(fontSizeComplexScript30);
            paragraphMarkRunProperties26.Append(languages36);

            paragraphProperties26.Append(spacingBetweenLines21);
            paragraphProperties26.Append(justification25);
            paragraphProperties26.Append(paragraphMarkRunProperties26);

            paragraph26.Append(paragraphProperties26);

            tableCell24.Append(tableCellProperties24);
            tableCell24.Append(paragraph26);

            tableRow6.Append(tableCell21);
            tableRow6.Append(tableCell22);
            tableRow6.Append(tableCell23);
            tableRow6.Append(tableCell24);

            TableRow tableRow7 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell25 = new TableCell();

            TableCellProperties tableCellProperties25 = new TableCellProperties();
            TableCellWidth tableCellWidth25 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties25.Append(tableCellWidth25);

            Paragraph paragraph27 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties27 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines22 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification26 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties27 = new ParagraphMarkRunProperties();
            RunFonts runFonts37 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize31 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript31 = new FontSizeComplexScript() { Val = "28" };
            Languages languages37 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties27.Append(runFonts37);
            paragraphMarkRunProperties27.Append(fontSize31);
            paragraphMarkRunProperties27.Append(fontSizeComplexScript31);
            paragraphMarkRunProperties27.Append(languages37);

            paragraphProperties27.Append(spacingBetweenLines22);
            paragraphProperties27.Append(justification26);
            paragraphProperties27.Append(paragraphMarkRunProperties27);

            paragraph27.Append(paragraphProperties27);

            tableCell25.Append(tableCellProperties25);
            tableCell25.Append(paragraph27);

            TableCell tableCell26 = new TableCell();

            TableCellProperties tableCellProperties26 = new TableCellProperties();
            TableCellWidth tableCellWidth26 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties26.Append(tableCellWidth26);

            Paragraph paragraph28 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties28 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines23 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification27 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties28 = new ParagraphMarkRunProperties();
            RunFonts runFonts38 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize32 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript32 = new FontSizeComplexScript() { Val = "28" };
            Languages languages38 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties28.Append(runFonts38);
            paragraphMarkRunProperties28.Append(fontSize32);
            paragraphMarkRunProperties28.Append(fontSizeComplexScript32);
            paragraphMarkRunProperties28.Append(languages38);

            paragraphProperties28.Append(spacingBetweenLines23);
            paragraphProperties28.Append(justification27);
            paragraphProperties28.Append(paragraphMarkRunProperties28);

            paragraph28.Append(paragraphProperties28);

            tableCell26.Append(tableCellProperties26);
            tableCell26.Append(paragraph28);

            TableCell tableCell27 = new TableCell();

            TableCellProperties tableCellProperties27 = new TableCellProperties();
            TableCellWidth tableCellWidth27 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties27.Append(tableCellWidth27);

            Paragraph paragraph29 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties29 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines24 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification28 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties29 = new ParagraphMarkRunProperties();
            RunFonts runFonts39 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize33 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript33 = new FontSizeComplexScript() { Val = "28" };
            Languages languages39 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties29.Append(runFonts39);
            paragraphMarkRunProperties29.Append(fontSize33);
            paragraphMarkRunProperties29.Append(fontSizeComplexScript33);
            paragraphMarkRunProperties29.Append(languages39);

            paragraphProperties29.Append(spacingBetweenLines24);
            paragraphProperties29.Append(justification28);
            paragraphProperties29.Append(paragraphMarkRunProperties29);

            paragraph29.Append(paragraphProperties29);

            tableCell27.Append(tableCellProperties27);
            tableCell27.Append(paragraph29);

            TableCell tableCell28 = new TableCell();

            TableCellProperties tableCellProperties28 = new TableCellProperties();
            TableCellWidth tableCellWidth28 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties28.Append(tableCellWidth28);

            Paragraph paragraph30 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties30 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines25 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification29 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties30 = new ParagraphMarkRunProperties();
            RunFonts runFonts40 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize34 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript34 = new FontSizeComplexScript() { Val = "28" };
            Languages languages40 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties30.Append(runFonts40);
            paragraphMarkRunProperties30.Append(fontSize34);
            paragraphMarkRunProperties30.Append(fontSizeComplexScript34);
            paragraphMarkRunProperties30.Append(languages40);

            paragraphProperties30.Append(spacingBetweenLines25);
            paragraphProperties30.Append(justification29);
            paragraphProperties30.Append(paragraphMarkRunProperties30);

            paragraph30.Append(paragraphProperties30);

            tableCell28.Append(tableCellProperties28);
            tableCell28.Append(paragraph30);

            tableRow7.Append(tableCell25);
            tableRow7.Append(tableCell26);
            tableRow7.Append(tableCell27);
            tableRow7.Append(tableCell28);

            TableRow tableRow8 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell29 = new TableCell();

            TableCellProperties tableCellProperties29 = new TableCellProperties();
            TableCellWidth tableCellWidth29 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties29.Append(tableCellWidth29);

            Paragraph paragraph31 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties31 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines26 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification30 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties31 = new ParagraphMarkRunProperties();
            RunFonts runFonts41 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize35 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript35 = new FontSizeComplexScript() { Val = "28" };
            Languages languages41 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties31.Append(runFonts41);
            paragraphMarkRunProperties31.Append(fontSize35);
            paragraphMarkRunProperties31.Append(fontSizeComplexScript35);
            paragraphMarkRunProperties31.Append(languages41);

            paragraphProperties31.Append(spacingBetweenLines26);
            paragraphProperties31.Append(justification30);
            paragraphProperties31.Append(paragraphMarkRunProperties31);

            paragraph31.Append(paragraphProperties31);

            tableCell29.Append(tableCellProperties29);
            tableCell29.Append(paragraph31);

            TableCell tableCell30 = new TableCell();

            TableCellProperties tableCellProperties30 = new TableCellProperties();
            TableCellWidth tableCellWidth30 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties30.Append(tableCellWidth30);

            Paragraph paragraph32 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties32 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines27 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification31 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties32 = new ParagraphMarkRunProperties();
            RunFonts runFonts42 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize36 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript36 = new FontSizeComplexScript() { Val = "28" };
            Languages languages42 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties32.Append(runFonts42);
            paragraphMarkRunProperties32.Append(fontSize36);
            paragraphMarkRunProperties32.Append(fontSizeComplexScript36);
            paragraphMarkRunProperties32.Append(languages42);

            paragraphProperties32.Append(spacingBetweenLines27);
            paragraphProperties32.Append(justification31);
            paragraphProperties32.Append(paragraphMarkRunProperties32);

            paragraph32.Append(paragraphProperties32);

            tableCell30.Append(tableCellProperties30);
            tableCell30.Append(paragraph32);

            TableCell tableCell31 = new TableCell();

            TableCellProperties tableCellProperties31 = new TableCellProperties();
            TableCellWidth tableCellWidth31 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties31.Append(tableCellWidth31);

            Paragraph paragraph33 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties33 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines28 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification32 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties33 = new ParagraphMarkRunProperties();
            RunFonts runFonts43 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize37 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript37 = new FontSizeComplexScript() { Val = "28" };
            Languages languages43 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties33.Append(runFonts43);
            paragraphMarkRunProperties33.Append(fontSize37);
            paragraphMarkRunProperties33.Append(fontSizeComplexScript37);
            paragraphMarkRunProperties33.Append(languages43);

            paragraphProperties33.Append(spacingBetweenLines28);
            paragraphProperties33.Append(justification32);
            paragraphProperties33.Append(paragraphMarkRunProperties33);

            paragraph33.Append(paragraphProperties33);

            tableCell31.Append(tableCellProperties31);
            tableCell31.Append(paragraph33);

            TableCell tableCell32 = new TableCell();

            TableCellProperties tableCellProperties32 = new TableCellProperties();
            TableCellWidth tableCellWidth32 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties32.Append(tableCellWidth32);

            Paragraph paragraph34 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties34 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines29 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification33 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties34 = new ParagraphMarkRunProperties();
            RunFonts runFonts44 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize38 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript38 = new FontSizeComplexScript() { Val = "28" };
            Languages languages44 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties34.Append(runFonts44);
            paragraphMarkRunProperties34.Append(fontSize38);
            paragraphMarkRunProperties34.Append(fontSizeComplexScript38);
            paragraphMarkRunProperties34.Append(languages44);

            paragraphProperties34.Append(spacingBetweenLines29);
            paragraphProperties34.Append(justification33);
            paragraphProperties34.Append(paragraphMarkRunProperties34);

            paragraph34.Append(paragraphProperties34);

            tableCell32.Append(tableCellProperties32);
            tableCell32.Append(paragraph34);

            tableRow8.Append(tableCell29);
            tableRow8.Append(tableCell30);
            tableRow8.Append(tableCell31);
            tableRow8.Append(tableCell32);

            TableRow tableRow9 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell33 = new TableCell();

            TableCellProperties tableCellProperties33 = new TableCellProperties();
            TableCellWidth tableCellWidth33 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties33.Append(tableCellWidth33);

            Paragraph paragraph35 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties35 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines30 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification34 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties35 = new ParagraphMarkRunProperties();
            RunFonts runFonts45 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize39 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript39 = new FontSizeComplexScript() { Val = "28" };
            Languages languages45 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties35.Append(runFonts45);
            paragraphMarkRunProperties35.Append(fontSize39);
            paragraphMarkRunProperties35.Append(fontSizeComplexScript39);
            paragraphMarkRunProperties35.Append(languages45);

            paragraphProperties35.Append(spacingBetweenLines30);
            paragraphProperties35.Append(justification34);
            paragraphProperties35.Append(paragraphMarkRunProperties35);

            paragraph35.Append(paragraphProperties35);

            tableCell33.Append(tableCellProperties33);
            tableCell33.Append(paragraph35);

            TableCell tableCell34 = new TableCell();

            TableCellProperties tableCellProperties34 = new TableCellProperties();
            TableCellWidth tableCellWidth34 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties34.Append(tableCellWidth34);

            Paragraph paragraph36 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties36 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines31 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification35 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties36 = new ParagraphMarkRunProperties();
            RunFonts runFonts46 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize40 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript40 = new FontSizeComplexScript() { Val = "28" };
            Languages languages46 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties36.Append(runFonts46);
            paragraphMarkRunProperties36.Append(fontSize40);
            paragraphMarkRunProperties36.Append(fontSizeComplexScript40);
            paragraphMarkRunProperties36.Append(languages46);

            paragraphProperties36.Append(spacingBetweenLines31);
            paragraphProperties36.Append(justification35);
            paragraphProperties36.Append(paragraphMarkRunProperties36);

            paragraph36.Append(paragraphProperties36);

            tableCell34.Append(tableCellProperties34);
            tableCell34.Append(paragraph36);

            TableCell tableCell35 = new TableCell();

            TableCellProperties tableCellProperties35 = new TableCellProperties();
            TableCellWidth tableCellWidth35 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties35.Append(tableCellWidth35);

            Paragraph paragraph37 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties37 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines32 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification36 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties37 = new ParagraphMarkRunProperties();
            RunFonts runFonts47 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize41 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript41 = new FontSizeComplexScript() { Val = "28" };
            Languages languages47 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties37.Append(runFonts47);
            paragraphMarkRunProperties37.Append(fontSize41);
            paragraphMarkRunProperties37.Append(fontSizeComplexScript41);
            paragraphMarkRunProperties37.Append(languages47);

            paragraphProperties37.Append(spacingBetweenLines32);
            paragraphProperties37.Append(justification36);
            paragraphProperties37.Append(paragraphMarkRunProperties37);

            paragraph37.Append(paragraphProperties37);

            tableCell35.Append(tableCellProperties35);
            tableCell35.Append(paragraph37);

            TableCell tableCell36 = new TableCell();

            TableCellProperties tableCellProperties36 = new TableCellProperties();
            TableCellWidth tableCellWidth36 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties36.Append(tableCellWidth36);

            Paragraph paragraph38 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties38 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines33 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification37 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties38 = new ParagraphMarkRunProperties();
            RunFonts runFonts48 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize42 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript42 = new FontSizeComplexScript() { Val = "28" };
            Languages languages48 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties38.Append(runFonts48);
            paragraphMarkRunProperties38.Append(fontSize42);
            paragraphMarkRunProperties38.Append(fontSizeComplexScript42);
            paragraphMarkRunProperties38.Append(languages48);

            paragraphProperties38.Append(spacingBetweenLines33);
            paragraphProperties38.Append(justification37);
            paragraphProperties38.Append(paragraphMarkRunProperties38);

            paragraph38.Append(paragraphProperties38);

            tableCell36.Append(tableCellProperties36);
            tableCell36.Append(paragraph38);

            tableRow9.Append(tableCell33);
            tableRow9.Append(tableCell34);
            tableRow9.Append(tableCell35);
            tableRow9.Append(tableCell36);

            TableRow tableRow10 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell37 = new TableCell();

            TableCellProperties tableCellProperties37 = new TableCellProperties();
            TableCellWidth tableCellWidth37 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties37.Append(tableCellWidth37);

            Paragraph paragraph39 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties39 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines34 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification38 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties39 = new ParagraphMarkRunProperties();
            RunFonts runFonts49 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize43 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript43 = new FontSizeComplexScript() { Val = "28" };
            Languages languages49 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties39.Append(runFonts49);
            paragraphMarkRunProperties39.Append(fontSize43);
            paragraphMarkRunProperties39.Append(fontSizeComplexScript43);
            paragraphMarkRunProperties39.Append(languages49);

            paragraphProperties39.Append(spacingBetweenLines34);
            paragraphProperties39.Append(justification38);
            paragraphProperties39.Append(paragraphMarkRunProperties39);

            paragraph39.Append(paragraphProperties39);

            tableCell37.Append(tableCellProperties37);
            tableCell37.Append(paragraph39);

            TableCell tableCell38 = new TableCell();

            TableCellProperties tableCellProperties38 = new TableCellProperties();
            TableCellWidth tableCellWidth38 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties38.Append(tableCellWidth38);

            Paragraph paragraph40 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties40 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines35 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification39 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties40 = new ParagraphMarkRunProperties();
            RunFonts runFonts50 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize44 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript44 = new FontSizeComplexScript() { Val = "28" };
            Languages languages50 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties40.Append(runFonts50);
            paragraphMarkRunProperties40.Append(fontSize44);
            paragraphMarkRunProperties40.Append(fontSizeComplexScript44);
            paragraphMarkRunProperties40.Append(languages50);

            paragraphProperties40.Append(spacingBetweenLines35);
            paragraphProperties40.Append(justification39);
            paragraphProperties40.Append(paragraphMarkRunProperties40);

            paragraph40.Append(paragraphProperties40);

            tableCell38.Append(tableCellProperties38);
            tableCell38.Append(paragraph40);

            TableCell tableCell39 = new TableCell();

            TableCellProperties tableCellProperties39 = new TableCellProperties();
            TableCellWidth tableCellWidth39 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties39.Append(tableCellWidth39);

            Paragraph paragraph41 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties41 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines36 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification40 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties41 = new ParagraphMarkRunProperties();
            RunFonts runFonts51 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize45 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript45 = new FontSizeComplexScript() { Val = "28" };
            Languages languages51 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties41.Append(runFonts51);
            paragraphMarkRunProperties41.Append(fontSize45);
            paragraphMarkRunProperties41.Append(fontSizeComplexScript45);
            paragraphMarkRunProperties41.Append(languages51);

            paragraphProperties41.Append(spacingBetweenLines36);
            paragraphProperties41.Append(justification40);
            paragraphProperties41.Append(paragraphMarkRunProperties41);

            paragraph41.Append(paragraphProperties41);

            tableCell39.Append(tableCellProperties39);
            tableCell39.Append(paragraph41);

            TableCell tableCell40 = new TableCell();

            TableCellProperties tableCellProperties40 = new TableCellProperties();
            TableCellWidth tableCellWidth40 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties40.Append(tableCellWidth40);

            Paragraph paragraph42 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties42 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines37 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification41 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties42 = new ParagraphMarkRunProperties();
            RunFonts runFonts52 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize46 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript46 = new FontSizeComplexScript() { Val = "28" };
            Languages languages52 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties42.Append(runFonts52);
            paragraphMarkRunProperties42.Append(fontSize46);
            paragraphMarkRunProperties42.Append(fontSizeComplexScript46);
            paragraphMarkRunProperties42.Append(languages52);

            paragraphProperties42.Append(spacingBetweenLines37);
            paragraphProperties42.Append(justification41);
            paragraphProperties42.Append(paragraphMarkRunProperties42);

            paragraph42.Append(paragraphProperties42);

            tableCell40.Append(tableCellProperties40);
            tableCell40.Append(paragraph42);

            tableRow10.Append(tableCell37);
            tableRow10.Append(tableCell38);
            tableRow10.Append(tableCell39);
            tableRow10.Append(tableCell40);

            TableRow tableRow11 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell41 = new TableCell();

            TableCellProperties tableCellProperties41 = new TableCellProperties();
            TableCellWidth tableCellWidth41 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties41.Append(tableCellWidth41);

            Paragraph paragraph43 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties43 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines38 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification42 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties43 = new ParagraphMarkRunProperties();
            RunFonts runFonts53 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize47 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript47 = new FontSizeComplexScript() { Val = "28" };
            Languages languages53 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties43.Append(runFonts53);
            paragraphMarkRunProperties43.Append(fontSize47);
            paragraphMarkRunProperties43.Append(fontSizeComplexScript47);
            paragraphMarkRunProperties43.Append(languages53);

            paragraphProperties43.Append(spacingBetweenLines38);
            paragraphProperties43.Append(justification42);
            paragraphProperties43.Append(paragraphMarkRunProperties43);

            paragraph43.Append(paragraphProperties43);

            tableCell41.Append(tableCellProperties41);
            tableCell41.Append(paragraph43);

            TableCell tableCell42 = new TableCell();

            TableCellProperties tableCellProperties42 = new TableCellProperties();
            TableCellWidth tableCellWidth42 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties42.Append(tableCellWidth42);

            Paragraph paragraph44 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties44 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines39 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification43 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties44 = new ParagraphMarkRunProperties();
            RunFonts runFonts54 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize48 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript48 = new FontSizeComplexScript() { Val = "28" };
            Languages languages54 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties44.Append(runFonts54);
            paragraphMarkRunProperties44.Append(fontSize48);
            paragraphMarkRunProperties44.Append(fontSizeComplexScript48);
            paragraphMarkRunProperties44.Append(languages54);

            paragraphProperties44.Append(spacingBetweenLines39);
            paragraphProperties44.Append(justification43);
            paragraphProperties44.Append(paragraphMarkRunProperties44);

            paragraph44.Append(paragraphProperties44);

            tableCell42.Append(tableCellProperties42);
            tableCell42.Append(paragraph44);

            TableCell tableCell43 = new TableCell();

            TableCellProperties tableCellProperties43 = new TableCellProperties();
            TableCellWidth tableCellWidth43 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties43.Append(tableCellWidth43);

            Paragraph paragraph45 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties45 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines40 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification44 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties45 = new ParagraphMarkRunProperties();
            RunFonts runFonts55 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize49 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript49 = new FontSizeComplexScript() { Val = "28" };
            Languages languages55 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties45.Append(runFonts55);
            paragraphMarkRunProperties45.Append(fontSize49);
            paragraphMarkRunProperties45.Append(fontSizeComplexScript49);
            paragraphMarkRunProperties45.Append(languages55);

            paragraphProperties45.Append(spacingBetweenLines40);
            paragraphProperties45.Append(justification44);
            paragraphProperties45.Append(paragraphMarkRunProperties45);

            paragraph45.Append(paragraphProperties45);

            tableCell43.Append(tableCellProperties43);
            tableCell43.Append(paragraph45);

            TableCell tableCell44 = new TableCell();

            TableCellProperties tableCellProperties44 = new TableCellProperties();
            TableCellWidth tableCellWidth44 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties44.Append(tableCellWidth44);

            Paragraph paragraph46 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties46 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines41 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification45 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties46 = new ParagraphMarkRunProperties();
            RunFonts runFonts56 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize50 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript50 = new FontSizeComplexScript() { Val = "28" };
            Languages languages56 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties46.Append(runFonts56);
            paragraphMarkRunProperties46.Append(fontSize50);
            paragraphMarkRunProperties46.Append(fontSizeComplexScript50);
            paragraphMarkRunProperties46.Append(languages56);

            paragraphProperties46.Append(spacingBetweenLines41);
            paragraphProperties46.Append(justification45);
            paragraphProperties46.Append(paragraphMarkRunProperties46);

            paragraph46.Append(paragraphProperties46);

            tableCell44.Append(tableCellProperties44);
            tableCell44.Append(paragraph46);

            tableRow11.Append(tableCell41);
            tableRow11.Append(tableCell42);
            tableRow11.Append(tableCell43);
            tableRow11.Append(tableCell44);

            TableRow tableRow12 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell45 = new TableCell();

            TableCellProperties tableCellProperties45 = new TableCellProperties();
            TableCellWidth tableCellWidth45 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties45.Append(tableCellWidth45);

            Paragraph paragraph47 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties47 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines42 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification46 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties47 = new ParagraphMarkRunProperties();
            RunFonts runFonts57 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize51 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript51 = new FontSizeComplexScript() { Val = "28" };
            Languages languages57 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties47.Append(runFonts57);
            paragraphMarkRunProperties47.Append(fontSize51);
            paragraphMarkRunProperties47.Append(fontSizeComplexScript51);
            paragraphMarkRunProperties47.Append(languages57);

            paragraphProperties47.Append(spacingBetweenLines42);
            paragraphProperties47.Append(justification46);
            paragraphProperties47.Append(paragraphMarkRunProperties47);

            paragraph47.Append(paragraphProperties47);

            tableCell45.Append(tableCellProperties45);
            tableCell45.Append(paragraph47);

            TableCell tableCell46 = new TableCell();

            TableCellProperties tableCellProperties46 = new TableCellProperties();
            TableCellWidth tableCellWidth46 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties46.Append(tableCellWidth46);

            Paragraph paragraph48 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties48 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines43 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification47 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties48 = new ParagraphMarkRunProperties();
            RunFonts runFonts58 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize52 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript52 = new FontSizeComplexScript() { Val = "28" };
            Languages languages58 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties48.Append(runFonts58);
            paragraphMarkRunProperties48.Append(fontSize52);
            paragraphMarkRunProperties48.Append(fontSizeComplexScript52);
            paragraphMarkRunProperties48.Append(languages58);

            paragraphProperties48.Append(spacingBetweenLines43);
            paragraphProperties48.Append(justification47);
            paragraphProperties48.Append(paragraphMarkRunProperties48);

            paragraph48.Append(paragraphProperties48);

            tableCell46.Append(tableCellProperties46);
            tableCell46.Append(paragraph48);

            TableCell tableCell47 = new TableCell();

            TableCellProperties tableCellProperties47 = new TableCellProperties();
            TableCellWidth tableCellWidth47 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties47.Append(tableCellWidth47);

            Paragraph paragraph49 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties49 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines44 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification48 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties49 = new ParagraphMarkRunProperties();
            RunFonts runFonts59 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize53 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript53 = new FontSizeComplexScript() { Val = "28" };
            Languages languages59 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties49.Append(runFonts59);
            paragraphMarkRunProperties49.Append(fontSize53);
            paragraphMarkRunProperties49.Append(fontSizeComplexScript53);
            paragraphMarkRunProperties49.Append(languages59);

            paragraphProperties49.Append(spacingBetweenLines44);
            paragraphProperties49.Append(justification48);
            paragraphProperties49.Append(paragraphMarkRunProperties49);

            paragraph49.Append(paragraphProperties49);

            tableCell47.Append(tableCellProperties47);
            tableCell47.Append(paragraph49);

            TableCell tableCell48 = new TableCell();

            TableCellProperties tableCellProperties48 = new TableCellProperties();
            TableCellWidth tableCellWidth48 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties48.Append(tableCellWidth48);

            Paragraph paragraph50 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties50 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines45 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification49 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties50 = new ParagraphMarkRunProperties();
            RunFonts runFonts60 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize54 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript54 = new FontSizeComplexScript() { Val = "28" };
            Languages languages60 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties50.Append(runFonts60);
            paragraphMarkRunProperties50.Append(fontSize54);
            paragraphMarkRunProperties50.Append(fontSizeComplexScript54);
            paragraphMarkRunProperties50.Append(languages60);

            paragraphProperties50.Append(spacingBetweenLines45);
            paragraphProperties50.Append(justification49);
            paragraphProperties50.Append(paragraphMarkRunProperties50);

            paragraph50.Append(paragraphProperties50);

            tableCell48.Append(tableCellProperties48);
            tableCell48.Append(paragraph50);

            tableRow12.Append(tableCell45);
            tableRow12.Append(tableCell46);
            tableRow12.Append(tableCell47);
            tableRow12.Append(tableCell48);

            TableRow tableRow13 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell49 = new TableCell();

            TableCellProperties tableCellProperties49 = new TableCellProperties();
            TableCellWidth tableCellWidth49 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties49.Append(tableCellWidth49);

            Paragraph paragraph51 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties51 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines46 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification50 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties51 = new ParagraphMarkRunProperties();
            RunFonts runFonts61 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize55 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript55 = new FontSizeComplexScript() { Val = "28" };
            Languages languages61 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties51.Append(runFonts61);
            paragraphMarkRunProperties51.Append(fontSize55);
            paragraphMarkRunProperties51.Append(fontSizeComplexScript55);
            paragraphMarkRunProperties51.Append(languages61);

            paragraphProperties51.Append(spacingBetweenLines46);
            paragraphProperties51.Append(justification50);
            paragraphProperties51.Append(paragraphMarkRunProperties51);

            paragraph51.Append(paragraphProperties51);

            tableCell49.Append(tableCellProperties49);
            tableCell49.Append(paragraph51);

            TableCell tableCell50 = new TableCell();

            TableCellProperties tableCellProperties50 = new TableCellProperties();
            TableCellWidth tableCellWidth50 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties50.Append(tableCellWidth50);

            Paragraph paragraph52 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties52 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines47 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification51 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties52 = new ParagraphMarkRunProperties();
            RunFonts runFonts62 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize56 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript56 = new FontSizeComplexScript() { Val = "28" };
            Languages languages62 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties52.Append(runFonts62);
            paragraphMarkRunProperties52.Append(fontSize56);
            paragraphMarkRunProperties52.Append(fontSizeComplexScript56);
            paragraphMarkRunProperties52.Append(languages62);

            paragraphProperties52.Append(spacingBetweenLines47);
            paragraphProperties52.Append(justification51);
            paragraphProperties52.Append(paragraphMarkRunProperties52);

            paragraph52.Append(paragraphProperties52);

            tableCell50.Append(tableCellProperties50);
            tableCell50.Append(paragraph52);

            TableCell tableCell51 = new TableCell();

            TableCellProperties tableCellProperties51 = new TableCellProperties();
            TableCellWidth tableCellWidth51 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties51.Append(tableCellWidth51);

            Paragraph paragraph53 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties53 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines48 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification52 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties53 = new ParagraphMarkRunProperties();
            RunFonts runFonts63 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize57 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript57 = new FontSizeComplexScript() { Val = "28" };
            Languages languages63 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties53.Append(runFonts63);
            paragraphMarkRunProperties53.Append(fontSize57);
            paragraphMarkRunProperties53.Append(fontSizeComplexScript57);
            paragraphMarkRunProperties53.Append(languages63);

            paragraphProperties53.Append(spacingBetweenLines48);
            paragraphProperties53.Append(justification52);
            paragraphProperties53.Append(paragraphMarkRunProperties53);

            paragraph53.Append(paragraphProperties53);

            tableCell51.Append(tableCellProperties51);
            tableCell51.Append(paragraph53);

            TableCell tableCell52 = new TableCell();

            TableCellProperties tableCellProperties52 = new TableCellProperties();
            TableCellWidth tableCellWidth52 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties52.Append(tableCellWidth52);

            Paragraph paragraph54 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties54 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines49 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification53 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties54 = new ParagraphMarkRunProperties();
            RunFonts runFonts64 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize58 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript58 = new FontSizeComplexScript() { Val = "28" };
            Languages languages64 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties54.Append(runFonts64);
            paragraphMarkRunProperties54.Append(fontSize58);
            paragraphMarkRunProperties54.Append(fontSizeComplexScript58);
            paragraphMarkRunProperties54.Append(languages64);

            paragraphProperties54.Append(spacingBetweenLines49);
            paragraphProperties54.Append(justification53);
            paragraphProperties54.Append(paragraphMarkRunProperties54);

            paragraph54.Append(paragraphProperties54);

            tableCell52.Append(tableCellProperties52);
            tableCell52.Append(paragraph54);

            tableRow13.Append(tableCell49);
            tableRow13.Append(tableCell50);
            tableRow13.Append(tableCell51);
            tableRow13.Append(tableCell52);

            TableRow tableRow14 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell53 = new TableCell();

            TableCellProperties tableCellProperties53 = new TableCellProperties();
            TableCellWidth tableCellWidth53 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties53.Append(tableCellWidth53);

            Paragraph paragraph55 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties55 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines50 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification54 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties55 = new ParagraphMarkRunProperties();
            RunFonts runFonts65 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize59 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript59 = new FontSizeComplexScript() { Val = "28" };
            Languages languages65 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties55.Append(runFonts65);
            paragraphMarkRunProperties55.Append(fontSize59);
            paragraphMarkRunProperties55.Append(fontSizeComplexScript59);
            paragraphMarkRunProperties55.Append(languages65);

            paragraphProperties55.Append(spacingBetweenLines50);
            paragraphProperties55.Append(justification54);
            paragraphProperties55.Append(paragraphMarkRunProperties55);

            paragraph55.Append(paragraphProperties55);

            tableCell53.Append(tableCellProperties53);
            tableCell53.Append(paragraph55);

            TableCell tableCell54 = new TableCell();

            TableCellProperties tableCellProperties54 = new TableCellProperties();
            TableCellWidth tableCellWidth54 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties54.Append(tableCellWidth54);

            Paragraph paragraph56 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties56 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines51 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification55 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties56 = new ParagraphMarkRunProperties();
            RunFonts runFonts66 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize60 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript60 = new FontSizeComplexScript() { Val = "28" };
            Languages languages66 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties56.Append(runFonts66);
            paragraphMarkRunProperties56.Append(fontSize60);
            paragraphMarkRunProperties56.Append(fontSizeComplexScript60);
            paragraphMarkRunProperties56.Append(languages66);

            paragraphProperties56.Append(spacingBetweenLines51);
            paragraphProperties56.Append(justification55);
            paragraphProperties56.Append(paragraphMarkRunProperties56);

            paragraph56.Append(paragraphProperties56);

            tableCell54.Append(tableCellProperties54);
            tableCell54.Append(paragraph56);

            TableCell tableCell55 = new TableCell();

            TableCellProperties tableCellProperties55 = new TableCellProperties();
            TableCellWidth tableCellWidth55 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties55.Append(tableCellWidth55);

            Paragraph paragraph57 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties57 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines52 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification56 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties57 = new ParagraphMarkRunProperties();
            RunFonts runFonts67 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize61 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript61 = new FontSizeComplexScript() { Val = "28" };
            Languages languages67 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties57.Append(runFonts67);
            paragraphMarkRunProperties57.Append(fontSize61);
            paragraphMarkRunProperties57.Append(fontSizeComplexScript61);
            paragraphMarkRunProperties57.Append(languages67);

            paragraphProperties57.Append(spacingBetweenLines52);
            paragraphProperties57.Append(justification56);
            paragraphProperties57.Append(paragraphMarkRunProperties57);

            paragraph57.Append(paragraphProperties57);

            tableCell55.Append(tableCellProperties55);
            tableCell55.Append(paragraph57);

            TableCell tableCell56 = new TableCell();

            TableCellProperties tableCellProperties56 = new TableCellProperties();
            TableCellWidth tableCellWidth56 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties56.Append(tableCellWidth56);

            Paragraph paragraph58 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties58 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines53 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification57 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties58 = new ParagraphMarkRunProperties();
            RunFonts runFonts68 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize62 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript62 = new FontSizeComplexScript() { Val = "28" };
            Languages languages68 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties58.Append(runFonts68);
            paragraphMarkRunProperties58.Append(fontSize62);
            paragraphMarkRunProperties58.Append(fontSizeComplexScript62);
            paragraphMarkRunProperties58.Append(languages68);

            paragraphProperties58.Append(spacingBetweenLines53);
            paragraphProperties58.Append(justification57);
            paragraphProperties58.Append(paragraphMarkRunProperties58);

            paragraph58.Append(paragraphProperties58);

            tableCell56.Append(tableCellProperties56);
            tableCell56.Append(paragraph58);

            tableRow14.Append(tableCell53);
            tableRow14.Append(tableCell54);
            tableRow14.Append(tableCell55);
            tableRow14.Append(tableCell56);

            TableRow tableRow15 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell57 = new TableCell();

            TableCellProperties tableCellProperties57 = new TableCellProperties();
            TableCellWidth tableCellWidth57 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties57.Append(tableCellWidth57);

            Paragraph paragraph59 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties59 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines54 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification58 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties59 = new ParagraphMarkRunProperties();
            RunFonts runFonts69 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize63 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript63 = new FontSizeComplexScript() { Val = "28" };
            Languages languages69 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties59.Append(runFonts69);
            paragraphMarkRunProperties59.Append(fontSize63);
            paragraphMarkRunProperties59.Append(fontSizeComplexScript63);
            paragraphMarkRunProperties59.Append(languages69);

            paragraphProperties59.Append(spacingBetweenLines54);
            paragraphProperties59.Append(justification58);
            paragraphProperties59.Append(paragraphMarkRunProperties59);

            paragraph59.Append(paragraphProperties59);

            tableCell57.Append(tableCellProperties57);
            tableCell57.Append(paragraph59);

            TableCell tableCell58 = new TableCell();

            TableCellProperties tableCellProperties58 = new TableCellProperties();
            TableCellWidth tableCellWidth58 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties58.Append(tableCellWidth58);

            Paragraph paragraph60 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties60 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines55 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification59 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties60 = new ParagraphMarkRunProperties();
            RunFonts runFonts70 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize64 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript64 = new FontSizeComplexScript() { Val = "28" };
            Languages languages70 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties60.Append(runFonts70);
            paragraphMarkRunProperties60.Append(fontSize64);
            paragraphMarkRunProperties60.Append(fontSizeComplexScript64);
            paragraphMarkRunProperties60.Append(languages70);

            paragraphProperties60.Append(spacingBetweenLines55);
            paragraphProperties60.Append(justification59);
            paragraphProperties60.Append(paragraphMarkRunProperties60);

            paragraph60.Append(paragraphProperties60);

            tableCell58.Append(tableCellProperties58);
            tableCell58.Append(paragraph60);

            TableCell tableCell59 = new TableCell();

            TableCellProperties tableCellProperties59 = new TableCellProperties();
            TableCellWidth tableCellWidth59 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties59.Append(tableCellWidth59);

            Paragraph paragraph61 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties61 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines56 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification60 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties61 = new ParagraphMarkRunProperties();
            RunFonts runFonts71 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize65 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript65 = new FontSizeComplexScript() { Val = "28" };
            Languages languages71 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties61.Append(runFonts71);
            paragraphMarkRunProperties61.Append(fontSize65);
            paragraphMarkRunProperties61.Append(fontSizeComplexScript65);
            paragraphMarkRunProperties61.Append(languages71);

            paragraphProperties61.Append(spacingBetweenLines56);
            paragraphProperties61.Append(justification60);
            paragraphProperties61.Append(paragraphMarkRunProperties61);

            paragraph61.Append(paragraphProperties61);

            tableCell59.Append(tableCellProperties59);
            tableCell59.Append(paragraph61);

            TableCell tableCell60 = new TableCell();

            TableCellProperties tableCellProperties60 = new TableCellProperties();
            TableCellWidth tableCellWidth60 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties60.Append(tableCellWidth60);

            Paragraph paragraph62 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties62 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines57 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification61 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties62 = new ParagraphMarkRunProperties();
            RunFonts runFonts72 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize66 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript66 = new FontSizeComplexScript() { Val = "28" };
            Languages languages72 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties62.Append(runFonts72);
            paragraphMarkRunProperties62.Append(fontSize66);
            paragraphMarkRunProperties62.Append(fontSizeComplexScript66);
            paragraphMarkRunProperties62.Append(languages72);

            paragraphProperties62.Append(spacingBetweenLines57);
            paragraphProperties62.Append(justification61);
            paragraphProperties62.Append(paragraphMarkRunProperties62);

            paragraph62.Append(paragraphProperties62);

            tableCell60.Append(tableCellProperties60);
            tableCell60.Append(paragraph62);

            tableRow15.Append(tableCell57);
            tableRow15.Append(tableCell58);
            tableRow15.Append(tableCell59);
            tableRow15.Append(tableCell60);

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(tableRow1);
            table1.Append(tableRow2);
            table1.Append(tableRow3);
            table1.Append(tableRow4);
            table1.Append(tableRow5);
            table1.Append(tableRow6);
            table1.Append(tableRow7);
            table1.Append(tableRow8);
            table1.Append(tableRow9);
            table1.Append(tableRow10);
            table1.Append(tableRow11);
            table1.Append(tableRow12);
            table1.Append(tableRow13);
            table1.Append(tableRow14);
            table1.Append(tableRow15);

            //SectionProperties sectionProperties1 = new SectionProperties() { RsidRPr = "00E24EED", RsidR = "00E43BFF", RsidSect = "00FF205A" };
            //PageSize pageSize1 = new PageSize() { Width = (UInt32Value)11906U, Height = (UInt32Value)16838U };
            //PageMargin pageMargin1 = new PageMargin() { Top = 1440, Right = (UInt32Value)992U, Bottom = 1440, Left = (UInt32Value)1701U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
            //PageNumberType pageNumberType1 = new PageNumberType() { Start = 1 };
            //Columns columns1 = new Columns() { Space = "720" };
            //TitlePage titlePage1 = new TitlePage();
            //DocGrid docGrid1 = new DocGrid() { LinePitch = 326 };

            //sectionProperties1.Append(pageSize1);
            //sectionProperties1.Append(pageMargin1);
            //sectionProperties1.Append(pageNumberType1);
            //sectionProperties1.Append(columns1);
            //sectionProperties1.Append(titlePage1);
            //sectionProperties1.Append(docGrid1);

            _body.Append(paragraph1);
            _body.Append(paragraph2);
            _body.Append(table1);
            //_body.Append(sectionProperties1);
        }
コード例 #31
0
        /// <summary>
        ///     Create Header row styles.
        /// </summary>
        private static TableStyleProperties CreateHeaderRowStyles( )
        {
            TableStyleProperties tableStyleProperties1 = new TableStyleProperties
            {
                Type = TableStyleOverrideValues.FirstRow
            };

            StyleParagraphProperties styleParagraphProperties2 = new StyleParagraphProperties( );
            SpacingBetweenLines      spacingBetweenLines3      = new SpacingBetweenLines
            {
                Before   = "0",
                After    = "0",
                Line     = "240",
                LineRule = LineSpacingRuleValues.Auto
            };

            styleParagraphProperties2.Append(spacingBetweenLines3);

            RunPropertiesBaseStyle runPropertiesBaseStyle2 = new RunPropertiesBaseStyle( );
            Bold bold1 = new Bold( );
            BoldComplexScript boldComplexScript1 = new BoldComplexScript( );
            Color             color1             = new Color
            {
                Val        = "FFFFFF",
                ThemeColor = ThemeColorValues.Background1
            };

            runPropertiesBaseStyle2.Append(bold1);
            runPropertiesBaseStyle2.Append(boldComplexScript1);
            runPropertiesBaseStyle2.Append(color1);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties1 = new TableStyleConditionalFormattingTableProperties( );

            TableStyleConditionalFormattingTableRowProperties tableStyleConditionalFormattingTableRowProperties1 = new TableStyleConditionalFormattingTableRowProperties( );
            TableHeader tableHeader1 = new TableHeader( );

            tableStyleConditionalFormattingTableRowProperties1.Append(tableHeader1);

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties1 = new TableStyleConditionalFormattingTableCellProperties( );

            TableCellBorders tableCellBorders1 = new TableCellBorders( );
            TopBorder        topBorder2        = new TopBorder
            {
                Val        = BorderValues.Single,
                Color      = "7BA0CD",
                ThemeColor = ThemeColorValues.Accent1,
                ThemeTint  = "BF",
                Size       = 8U,
                Space      = 0U
            };
            LeftBorder leftBorder2 = new LeftBorder
            {
                Val        = BorderValues.Single,
                Color      = "7BA0CD",
                ThemeColor = ThemeColorValues.Accent1,
                ThemeTint  = "BF",
                Size       = 8U,
                Space      = 0U
            };
            BottomBorder bottomBorder2 = new BottomBorder
            {
                Val        = BorderValues.Single,
                Color      = "7BA0CD",
                ThemeColor = ThemeColorValues.Accent1,
                ThemeTint  = "BF",
                Size       = 8U,
                Space      = 0U
            };
            RightBorder rightBorder2 = new RightBorder
            {
                Val        = BorderValues.Single,
                Color      = "7BA0CD",
                ThemeColor = ThemeColorValues.Accent1,
                ThemeTint  = "BF",
                Size       = 8U,
                Space      = 0U
            };
            InsideHorizontalBorder insideHorizontalBorder2 = new InsideHorizontalBorder
            {
                Val = BorderValues.Nil
            };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder
            {
                Val = BorderValues.Nil
            };

            tableCellBorders1.Append(topBorder2);
            tableCellBorders1.Append(leftBorder2);
            tableCellBorders1.Append(bottomBorder2);
            tableCellBorders1.Append(rightBorder2);
            tableCellBorders1.Append(insideHorizontalBorder2);
            tableCellBorders1.Append(insideVerticalBorder1);

            Shading shading1 = new Shading
            {
                Val       = ShadingPatternValues.Clear,
                Color     = "auto",
                Fill      = "4F81BD",
                ThemeFill = ThemeColorValues.Accent1
            };

            tableStyleConditionalFormattingTableCellProperties1.Append(tableCellBorders1);
            tableStyleConditionalFormattingTableCellProperties1.Append(shading1);

            tableStyleProperties1.Append(styleParagraphProperties2);
            tableStyleProperties1.Append(runPropertiesBaseStyle2);
            tableStyleProperties1.Append(tableStyleConditionalFormattingTableProperties1);
            tableStyleProperties1.Append(tableStyleConditionalFormattingTableRowProperties1);
            tableStyleProperties1.Append(tableStyleConditionalFormattingTableCellProperties1);
            return(tableStyleProperties1);
        }
コード例 #32
0
        private static void GenerateWorkbookStylesPartContent(WorkbookStylesPart workbookStylesPart1)
        {
            Stylesheet stylesheet1 = new Stylesheet()
            {
                MCAttributes = new MarkupCompatibilityAttributes()
                {
                    Ignorable = "x14ac"
                }
            };

            stylesheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            stylesheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");

            Fonts fonts1 = new Fonts()
            {
                Count = (UInt32Value)2U, KnownFonts = true
            };

            Font     font1     = new Font();
            FontSize fontSize1 = new FontSize()
            {
                Val = 11D
            };
            Color color1 = new Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName fontName1 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering1 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme1 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font1.Append(fontSize1);
            font1.Append(color1);
            font1.Append(fontName1);
            font1.Append(fontFamilyNumbering1);
            font1.Append(fontScheme1);

            Font     font2     = new Font();
            Bold     bold1     = new Bold();
            FontSize fontSize2 = new FontSize()
            {
                Val = 11D
            };
            Color color2 = new Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName fontName2 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering2 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme2 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font2.Append(bold1);
            font2.Append(fontSize2);
            font2.Append(color2);
            font2.Append(fontName2);
            font2.Append(fontFamilyNumbering2);
            font2.Append(fontScheme2);

            fonts1.Append(font1);
            fonts1.Append(font2);

            Fills fills1 = new Fills()
            {
                Count = (UInt32Value)2U
            };

            Fill        fill1        = new Fill();
            PatternFill patternFill1 = new PatternFill()
            {
                PatternType = PatternValues.None
            };

            fill1.Append(patternFill1);

            Fill        fill2        = new Fill();
            PatternFill patternFill2 = new PatternFill()
            {
                PatternType = PatternValues.Gray125
            };

            fill2.Append(patternFill2);

            fills1.Append(fill1);
            fills1.Append(fill2);

            Borders borders1 = new Borders()
            {
                Count = (UInt32Value)2U
            };

            Border         border1         = new Border();
            LeftBorder     leftBorder1     = new LeftBorder();
            RightBorder    rightBorder1    = new RightBorder();
            TopBorder      topBorder1      = new TopBorder();
            BottomBorder   bottomBorder1   = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);

            Border border2 = new Border();

            LeftBorder leftBorder2 = new LeftBorder()
            {
                Style = BorderStyleValues.Thin
            };
            Color color3 = new Color()
            {
                Indexed = (UInt32Value)64U
            };

            leftBorder2.Append(color3);

            RightBorder rightBorder2 = new RightBorder()
            {
                Style = BorderStyleValues.Thin
            };
            Color color4 = new Color()
            {
                Indexed = (UInt32Value)64U
            };

            rightBorder2.Append(color4);

            TopBorder topBorder2 = new TopBorder()
            {
                Style = BorderStyleValues.Thin
            };
            Color color5 = new Color()
            {
                Indexed = (UInt32Value)64U
            };

            topBorder2.Append(color5);

            BottomBorder bottomBorder2 = new BottomBorder()
            {
                Style = BorderStyleValues.Thin
            };
            Color color6 = new Color()
            {
                Indexed = (UInt32Value)64U
            };

            bottomBorder2.Append(color6);
            DiagonalBorder diagonalBorder2 = new DiagonalBorder();

            border2.Append(leftBorder2);
            border2.Append(rightBorder2);
            border2.Append(topBorder2);
            border2.Append(bottomBorder2);
            border2.Append(diagonalBorder2);

            borders1.Append(border1);
            borders1.Append(border2);

            CellStyleFormats cellStyleFormats1 = new CellStyleFormats()
            {
                Count = (UInt32Value)1U
            };
            CellFormat cellFormat1 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U
            };

            cellStyleFormats1.Append(cellFormat1);

            CellFormats cellFormats1 = new CellFormats()
            {
                Count = (UInt32Value)4U
            };
            CellFormat cellFormat2 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };
            CellFormat cellFormat3 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)1U, FormatId = (UInt32Value)0U, ApplyBorder = true
            };
            CellFormat cellFormat4 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)1U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)1U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyBorder = true
            };
            CellFormat cellFormat6 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)22, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)1U, FormatId = (UInt32Value)0U, ApplyBorder = true
            };

            CellFormat cellFormat5 = new CellFormat()
            {
                ApplyNumberFormat = true,
                NumberFormatId    = Convert.ToUInt32(14)
            };

            cellFormats1.Append(cellFormat2);
            cellFormats1.Append(cellFormat3);
            cellFormats1.Append(cellFormat4);
            cellFormats1.Append(cellFormat5);
            cellFormats1.Append(cellFormat6);

            CellStyles cellStyles1 = new CellStyles()
            {
                Count = (UInt32Value)1U
            };
            CellStyle cellStyle1 = new CellStyle()
            {
                Name = "Normal", FormatId = (UInt32Value)0U, BuiltinId = (UInt32Value)0U
            };

            cellStyles1.Append(cellStyle1);
            DifferentialFormats differentialFormats1 = new DifferentialFormats()
            {
                Count = (UInt32Value)0U
            };
            TableStyles tableStyles1 = new TableStyles()
            {
                Count = (UInt32Value)0U, DefaultTableStyle = "TableStyleMedium2", DefaultPivotStyle = "PivotStyleLight16"
            };

            StylesheetExtensionList stylesheetExtensionList1 = new StylesheetExtensionList();

            StylesheetExtension stylesheetExtension1 = new StylesheetExtension()
            {
                Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"
            };

            stylesheetExtension1.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            X14.SlicerStyles slicerStyles1 = new X14.SlicerStyles()
            {
                DefaultSlicerStyle = "SlicerStyleLight1"
            };

            stylesheetExtension1.Append(slicerStyles1);

            StylesheetExtension stylesheetExtension2 = new StylesheetExtension()
            {
                Uri = "{9260A510-F301-46a8-8635-F512D64BE5F5}"
            };

            stylesheetExtension2.AddNamespaceDeclaration("x15", "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main");
            X15.TimelineStyles timelineStyles1 = new X15.TimelineStyles()
            {
                DefaultTimelineStyle = "TimeSlicerStyleLight1"
            };

            stylesheetExtension2.Append(timelineStyles1);

            stylesheetExtensionList1.Append(stylesheetExtension1);
            stylesheetExtensionList1.Append(stylesheetExtension2);



            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);
            stylesheet1.Append(tableStyles1);
            stylesheet1.Append(stylesheetExtensionList1);

            workbookStylesPart1.Stylesheet = stylesheet1;
        }
コード例 #33
0
        /// <summary>
        ///     Create Last Row Styles.
        /// </summary>
        private static TableStyleProperties CreateLastRowStyles( )
        {
            TableStyleProperties tableStyleProperties2 = new TableStyleProperties
            {
                Type = TableStyleOverrideValues.LastRow
            };

            StyleParagraphProperties styleParagraphProperties3 = new StyleParagraphProperties( );
            SpacingBetweenLines      spacingBetweenLines4      = new SpacingBetweenLines
            {
                Before   = "0",
                After    = "0",
                Line     = "240",
                LineRule = LineSpacingRuleValues.Auto
            };

            styleParagraphProperties3.Append(spacingBetweenLines4);

            RunPropertiesBaseStyle runPropertiesBaseStyle3 = new RunPropertiesBaseStyle( );
            Bold bold2 = new Bold( );
            BoldComplexScript boldComplexScript2 = new BoldComplexScript( );

            runPropertiesBaseStyle3.Append(bold2);
            runPropertiesBaseStyle3.Append(boldComplexScript2);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties2 = new TableStyleConditionalFormattingTableProperties( );

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties2 = new TableStyleConditionalFormattingTableCellProperties( );

            TableCellBorders tableCellBorders2 = new TableCellBorders( );
            TopBorder        topBorder3        = new TopBorder
            {
                Val        = BorderValues.Double,
                Color      = "7BA0CD",
                ThemeColor = ThemeColorValues.Accent1,
                ThemeTint  = "BF",
                Size       = 6U,
                Space      = 0U
            };
            LeftBorder leftBorder3 = new LeftBorder
            {
                Val        = BorderValues.Single,
                Color      = "7BA0CD",
                ThemeColor = ThemeColorValues.Accent1,
                ThemeTint  = "BF",
                Size       = 8U,
                Space      = 0U
            };
            BottomBorder bottomBorder3 = new BottomBorder
            {
                Val        = BorderValues.Single,
                Color      = "7BA0CD",
                ThemeColor = ThemeColorValues.Accent1,
                ThemeTint  = "BF",
                Size       = 8U,
                Space      = 0U
            };
            RightBorder rightBorder3 = new RightBorder
            {
                Val        = BorderValues.Single,
                Color      = "7BA0CD",
                ThemeColor = ThemeColorValues.Accent1,
                ThemeTint  = "BF",
                Size       = 8U,
                Space      = 0U
            };
            InsideHorizontalBorder insideHorizontalBorder3 = new InsideHorizontalBorder
            {
                Val = BorderValues.Nil
            };
            InsideVerticalBorder insideVerticalBorder2 = new InsideVerticalBorder
            {
                Val = BorderValues.Nil
            };

            tableCellBorders2.Append(topBorder3);
            tableCellBorders2.Append(leftBorder3);
            tableCellBorders2.Append(bottomBorder3);
            tableCellBorders2.Append(rightBorder3);
            tableCellBorders2.Append(insideHorizontalBorder3);
            tableCellBorders2.Append(insideVerticalBorder2);

            tableStyleConditionalFormattingTableCellProperties2.Append(tableCellBorders2);

            tableStyleProperties2.Append(styleParagraphProperties3);
            tableStyleProperties2.Append(runPropertiesBaseStyle3);
            tableStyleProperties2.Append(tableStyleConditionalFormattingTableProperties2);
            tableStyleProperties2.Append(tableStyleConditionalFormattingTableCellProperties2);
            return(tableStyleProperties2);
        }
コード例 #34
0
ファイル: QuestionnaireWriter.cs プロジェクト: ssjda-ddi/EDO
        private Table CreateFilledTable(bool hasBorder, bool hasInsideBorder)
        {
            //Create table with border(page's width)
            Table           table           = new Table();
            TableProperties tableProperties = new TableProperties();
            TableStyle      tableStyle      = new TableStyle()
            {
                Val = "TableGrid"
            };
            TableWidth tableWidth = new TableWidth()
            {
                Width = "5000", Type = TableWidthUnitValues.Pct
            };
            TableLook tableLook = new TableLook()
            {
                Val              = "04A0",
                FirstRow         = true,
                LastRow          = false,
                FirstColumn      = true,
                LastColumn       = false,
                NoHorizontalBand = false,
                NoVerticalBand   = true
            };

            tableProperties.Append(tableStyle);
            tableProperties.Append(tableWidth);
            tableProperties.Append(tableLook);

            TableBorders borders = new TableBorders();

            tableProperties.Append(borders);

            EnumValue <BorderValues> val = hasBorder ? BorderValues.Single : BorderValues.Nil;
            TopBorder topBorder          = new TopBorder()
            {
                Val = val
            };
            BottomBorder bottomBorder = new BottomBorder()
            {
                Val = val
            };
            LeftBorder leftBorder = new LeftBorder()
            {
                Val = val
            };
            RightBorder rightBorder = new RightBorder()
            {
                Val = val
            };

            borders.Append(topBorder);
            borders.Append(bottomBorder);
            borders.Append(leftBorder);
            borders.Append(rightBorder);

            val = hasInsideBorder ? BorderValues.Single : BorderValues.Nil;
            InsideHorizontalBorder horizontalBorder = new InsideHorizontalBorder()
            {
                Val = val
            };
            InsideVerticalBorder verticalBorder = new InsideVerticalBorder()
            {
                Val = val
            };

            borders.Append(horizontalBorder);
            borders.Append(verticalBorder);


            table.Append(tableProperties);
            return(table);
        }
コード例 #35
0
ファイル: Table.cs プロジェクト: yougayuki/MariGold.OpenXHTML
        public void TableBorder()
        {
            using (MemoryStream mem = new MemoryStream())
            {
                WordDocument doc = new WordDocument(mem);

                doc.Process(new HtmlParser("<table border='1'><tr><td>test</td></tr></table>"));

                Assert.IsNotNull(doc.Document.Body);
                Assert.AreEqual(1, doc.Document.Body.ChildElements.Count);

                Word.Table table = doc.Document.Body.ChildElements[0] as Word.Table;

                Assert.IsNotNull(table);
                Assert.AreEqual(3, table.ChildElements.Count);

                TableProperties tableProperties = table.ChildElements[0] as TableProperties;
                Assert.IsNotNull(tableProperties);

                TableStyle tableStyle = tableProperties.ChildElements[0] as TableStyle;
                Assert.IsNotNull(tableStyle);
                Assert.AreEqual("TableGrid", tableStyle.Val.Value);

                TableBorders tableBorders = tableProperties.ChildElements[1] as TableBorders;
                Assert.IsNotNull(tableBorders);
                Assert.AreEqual(4, tableBorders.ChildElements.Count);

                TopBorder topBorder = tableBorders.ChildElements[0] as TopBorder;
                Assert.IsNotNull(topBorder);
                TestUtility.TestBorder <TopBorder>(topBorder, BorderValues.Single, "auto", 4U);

                LeftBorder leftBorder = tableBorders.ChildElements[1] as LeftBorder;
                Assert.IsNotNull(leftBorder);
                TestUtility.TestBorder <LeftBorder>(leftBorder, BorderValues.Single, "auto", 4U);

                BottomBorder bottomBorder = tableBorders.ChildElements[2] as BottomBorder;
                Assert.IsNotNull(bottomBorder);
                TestUtility.TestBorder <BottomBorder>(bottomBorder, BorderValues.Single, "auto", 4U);

                RightBorder rightBorder = tableBorders.ChildElements[3] as RightBorder;
                Assert.IsNotNull(rightBorder);
                TestUtility.TestBorder <RightBorder>(rightBorder, BorderValues.Single, "auto", 4U);

                TableRow row = table.ChildElements[2] as TableRow;

                Assert.IsNotNull(row);
                Assert.AreEqual(1, row.ChildElements.Count);

                TableCell cell = row.ChildElements[0] as TableCell;

                Assert.IsNotNull(cell);
                Assert.AreEqual(2, cell.ChildElements.Count);

                TableCellProperties cellProperties = cell.ChildElements[0] as TableCellProperties;
                Assert.IsNotNull(cellProperties);
                Assert.AreEqual(1, cellProperties.ChildElements.Count);

                TableCellBorders cellBorders = cellProperties.ChildElements[0] as TableCellBorders;
                Assert.IsNotNull(cellBorders);
                Assert.AreEqual(4, cellBorders.ChildElements.Count);

                topBorder = cellBorders.ChildElements[0] as TopBorder;
                Assert.IsNotNull(topBorder);
                TestUtility.TestBorder <TopBorder>(topBorder, BorderValues.Single, "auto", 4U);

                leftBorder = cellBorders.ChildElements[1] as LeftBorder;
                Assert.IsNotNull(leftBorder);
                TestUtility.TestBorder <LeftBorder>(leftBorder, BorderValues.Single, "auto", 4U);

                bottomBorder = cellBorders.ChildElements[2] as BottomBorder;
                Assert.IsNotNull(bottomBorder);
                TestUtility.TestBorder <BottomBorder>(bottomBorder, BorderValues.Single, "auto", 4U);

                rightBorder = cellBorders.ChildElements[3] as RightBorder;
                Assert.IsNotNull(rightBorder);
                TestUtility.TestBorder <RightBorder>(rightBorder, BorderValues.Single, "auto", 4U);

                Paragraph para = cell.ChildElements[1] as Paragraph;

                Assert.IsNotNull(para);
                Assert.AreEqual(1, para.ChildElements.Count);

                Run run = para.ChildElements[0] as Run;

                Assert.IsNotNull(run);
                Assert.AreEqual(1, run.ChildElements.Count);

                Word.Text text = run.ChildElements[0] as Word.Text;

                Assert.IsNotNull(text);
                Assert.AreEqual(0, text.ChildElements.Count);
                Assert.AreEqual("test", text.InnerText);

                OpenXmlValidator validator = new OpenXmlValidator();
                var errors = validator.Validate(doc.WordprocessingDocument);
                Assert.AreEqual(0, errors.Count());
            }
        }
コード例 #36
0
        // Creates an Table instance and adds its children.
        public static Table GenerateTable(GenerationData data)
        {
            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableWidth      tableWidth1      = new TableWidth()
            {
                Width = "0", Type = TableWidthUnitValues.Auto
            };
            TableIndentation tableIndentation1 = new TableIndentation()
            {
                Width = 10, Type = TableWidthUnitValues.Dxa
            };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder    topBorder1    = new TopBorder()
            {
                Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder1 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder1 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder1 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U
            };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder()
            {
                Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U
            };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder()
            {
                Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)10U, Space = (UInt32Value)0U
            };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);

            TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault();
            TableCellLeftMargin    tableCellLeftMargin1    = new TableCellLeftMargin()
            {
                Width = 10, Type = TableWidthValues.Dxa
            };
            TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin()
            {
                Width = 10, Type = TableWidthValues.Dxa
            };

            tableCellMarginDefault1.Append(tableCellLeftMargin1);
            tableCellMarginDefault1.Append(tableCellRightMargin1);
            TableLook tableLook1 = new TableLook()
            {
                Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false
            };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableIndentation1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableCellMarginDefault1);
            tableProperties1.Append(tableLook1);

            TableGrid  tableGrid1  = new TableGrid();
            GridColumn gridColumn1 = new GridColumn()
            {
                Width = "2550"
            };
            GridColumn gridColumn2 = new GridColumn()
            {
                Width = "5700"
            };
            GridColumn gridColumn3 = new GridColumn()
            {
                Width = "360"
            };

            tableGrid1.Append(gridColumn1);
            tableGrid1.Append(gridColumn2);
            tableGrid1.Append(gridColumn3);

            TableRow tableRow1 = new TableRow()
            {
                RsidTableRowAddition = "009B2C1D", ParagraphId = "5B63C23B", TextId = "77777777"
            };

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth      tableCellWidth1      = new TableCellWidth()
            {
                Width = "800", Type = TableWidthUnitValues.Dxa
            };
            GridSpan gridSpan1 = new GridSpan()
            {
                Val = 3
            };

            TableCellBorders tableCellBorders1 = new TableCellBorders();
            TopBorder        topBorder2        = new TopBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder2 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder2 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder2 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "FFFFFF", Size = (UInt32Value)0U, Space = (UInt32Value)0U
            };

            tableCellBorders1.Append(topBorder2);
            tableCellBorders1.Append(leftBorder2);
            tableCellBorders1.Append(bottomBorder2);
            tableCellBorders1.Append(rightBorder2);

            tableCellProperties1.Append(tableCellWidth1);
            tableCellProperties1.Append(gridSpan1);
            tableCellProperties1.Append(tableCellBorders1);

            Paragraph paragraph1 = new Paragraph()
            {
                RsidParagraphAddition = "009B2C1D", RsidRunAdditionDefault = "009E39C2", ParagraphId = "459760A7", TextId = "77777777"
            };

            Run run1 = new Run();

            RunProperties runProperties1 = new RunProperties();
            Bold          bold1          = new Bold();
            FontSize      fontSize1      = new FontSize()
            {
                Val = "22"
            };
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript()
            {
                Val = "22"
            };

            runProperties1.Append(bold1);
            runProperties1.Append(fontSize1);
            runProperties1.Append(fontSizeComplexScript1);
            Text text1 = new Text();

            text1.Text = "ADDITIONAL COURSES";

            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run();

            RunProperties runProperties2 = new RunProperties();
            FontSize      fontSize2      = new FontSize()
            {
                Val = "22"
            };
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript()
            {
                Val = "22"
            };

            runProperties2.Append(fontSize2);
            runProperties2.Append(fontSizeComplexScript2);
            Text text2 = new Text()
            {
                Space = SpaceProcessingModeValues.Preserve
            };

            text2.Text = "  ";

            run2.Append(runProperties2);
            run2.Append(text2);

            paragraph1.Append(run1);
            paragraph1.Append(run2);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph1);

            tableRow1.Append(tableCell1);

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(tableRow1);

            foreach (var course in data.AdditionalCourses)
            {
                TableRow generateRow = CreateAdditionalCourseRow(course);
                table1.Append(generateRow);
            }

            return(table1);
        }
コード例 #37
0
ファイル: Table.cs プロジェクト: yougayuki/MariGold.OpenXHTML
        public void TableCellStyleInheritance()
        {
            using (MemoryStream mem = new MemoryStream())
            {
                WordDocument doc = new WordDocument(mem);

                doc.Process(new HtmlParser("<table><tr><td style='border:1px solid #000;background-color:red'>test</td></tr></table>"));

                Assert.IsNotNull(doc.Document.Body);
                Assert.AreEqual(1, doc.Document.Body.ChildElements.Count);

                Word.Table table = doc.Document.Body.ChildElements[0] as Word.Table;

                Assert.IsNotNull(table);
                Assert.AreEqual(3, table.ChildElements.Count);

                TableRow row = table.ChildElements[2] as TableRow;

                Assert.IsNotNull(row);
                Assert.AreEqual(1, row.ChildElements.Count);

                TableCell cell = row.ChildElements[0] as TableCell;

                Assert.IsNotNull(cell);
                Assert.AreEqual(2, cell.ChildElements.Count);

                TableCellProperties cellProperties = cell.ChildElements[0] as TableCellProperties;

                Assert.IsNotNull(cellProperties);
                Assert.AreEqual(2, cellProperties.ChildElements.Count);

                TableCellBorders borders = cellProperties.ChildElements[0] as TableCellBorders;
                Assert.IsNotNull(borders);
                Assert.AreEqual(4, borders.ChildElements.Count);

                TopBorder topBorder = borders.ChildElements[0] as TopBorder;
                Assert.IsNotNull(topBorder);
                TestUtility.TestBorder <TopBorder>(topBorder, BorderValues.Single, "000000", 1U);

                LeftBorder leftBorder = borders.ChildElements[1] as LeftBorder;
                Assert.IsNotNull(leftBorder);
                TestUtility.TestBorder <LeftBorder>(leftBorder, BorderValues.Single, "000000", 1U);

                BottomBorder bottomBorder = borders.ChildElements[2] as BottomBorder;
                Assert.IsNotNull(bottomBorder);
                TestUtility.TestBorder <BottomBorder>(bottomBorder, BorderValues.Single, "000000", 1U);

                RightBorder rightBorder = borders.ChildElements[3] as RightBorder;
                Assert.IsNotNull(rightBorder);
                TestUtility.TestBorder <RightBorder>(rightBorder, BorderValues.Single, "000000", 1U);

                Word.Shading backgroundColor = cellProperties.ChildElements[1] as Word.Shading;
                Assert.IsNotNull(backgroundColor);
                Assert.AreEqual("FF0000", backgroundColor.Fill.Value);

                Paragraph para = cell.ChildElements[1] as Paragraph;
                Assert.IsNotNull(para);
                Assert.AreEqual(2, para.ChildElements.Count);

                ParagraphProperties properties = para.ChildElements[0] as ParagraphProperties;
                Assert.IsNotNull(properties);
                Assert.AreEqual(1, properties.ChildElements.Count);
                Word.Shading shading = properties.ChildElements[0] as Word.Shading;
                Assert.AreEqual("FF0000", shading.Fill.Value);

                Run run = para.ChildElements[1] as Run;
                Assert.IsNotNull(run);
                Assert.AreEqual(2, run.ChildElements.Count);

                RunProperties runProperties = run.ChildElements[0] as RunProperties;
                Assert.IsNotNull(runProperties);
                shading = runProperties.ChildElements[0] as Word.Shading;
                Assert.AreEqual("FF0000", shading.Fill.Value);

                Word.Text text = run.ChildElements[1] as Word.Text;
                Assert.IsNotNull(text);
                Assert.AreEqual("test", text.InnerText);

                OpenXmlValidator validator = new OpenXmlValidator();
                var errors = validator.Validate(doc.WordprocessingDocument);
                Assert.AreEqual(0, errors.Count());
            }
        }
コード例 #38
0
ファイル: SLBorder.cs プロジェクト: mousetwentytwo/test
        internal void FromBorderPropertiesType(LeftBorder border)
        {
            if (border.Color != null)
            {
                this.clrReal = new SLColor(this.listThemeColors, this.listIndexedColors);
                this.clrReal.FromSpreadsheetColor(border.Color);
                HasColor = !this.clrReal.IsEmpty();
            }
            else
            {
                RemoveColor();
            }

            if (border.Style != null) this.BorderStyle = border.Style.Value;
            else RemoveBorderStyle();
        }
コード例 #39
0
ファイル: SLBorder.cs プロジェクト: mousetwentytwo/test
        internal LeftBorder ToLeftBorder()
        {
            LeftBorder border = new LeftBorder();
            if (HasColor) border.Color = this.clrReal.ToSpreadsheetColor();
            if (HasBorderStyle) border.Style = this.BorderStyle;

            return border;
        }
コード例 #40
0
        // Generates content of part.
        private void GeneratePartContent(StyleDefinitionsPart part)
        {
            Styles styles1 = new Styles();
            styles1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            styles1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");

            DocDefaults docDefaults1 = new DocDefaults();

            RunPropertiesDefault runPropertiesDefault1 = new RunPropertiesDefault();

            RunPropertiesBaseStyle runPropertiesBaseStyle1 = new RunPropertiesBaseStyle();
            RunFonts runFonts1 = new RunFonts() { AsciiTheme = ThemeFontValues.MinorHighAnsi, HighAnsiTheme = ThemeFontValues.MinorHighAnsi, EastAsiaTheme = ThemeFontValues.MinorHighAnsi, ComplexScriptTheme = ThemeFontValues.MinorBidi };
            FontSize fontSize1 = new FontSize() { Val = "22" };
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "22" };
            Languages languages1 = new Languages() { Val = "en-US", EastAsia = "en-US", Bidi = "ar-SA" };

            runPropertiesBaseStyle1.Append(runFonts1);
            runPropertiesBaseStyle1.Append(fontSize1);
            runPropertiesBaseStyle1.Append(fontSizeComplexScript1);
            runPropertiesBaseStyle1.Append(languages1);

            runPropertiesDefault1.Append(runPropertiesBaseStyle1);

            ParagraphPropertiesDefault paragraphPropertiesDefault1 = new ParagraphPropertiesDefault();

            ParagraphPropertiesBaseStyle paragraphPropertiesBaseStyle1 = new ParagraphPropertiesBaseStyle();
            SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "200", Line = "276", LineRule = LineSpacingRuleValues.Auto };

            paragraphPropertiesBaseStyle1.Append(spacingBetweenLines1);

            paragraphPropertiesDefault1.Append(paragraphPropertiesBaseStyle1);

            docDefaults1.Append(runPropertiesDefault1);
            docDefaults1.Append(paragraphPropertiesDefault1);

            LatentStyles latentStyles1 = new LatentStyles() { DefaultLockedState = false, DefaultUiPriority = 99, DefaultSemiHidden = true, DefaultUnhideWhenUsed = true, DefaultPrimaryStyle = false, Count = 267 };
            LatentStyleExceptionInfo latentStyleExceptionInfo1 = new LatentStyleExceptionInfo() { Name = "Normal", UiPriority = 0, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo2 = new LatentStyleExceptionInfo() { Name = "heading 1", UiPriority = 9, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo3 = new LatentStyleExceptionInfo() { Name = "heading 2", UiPriority = 9, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo4 = new LatentStyleExceptionInfo() { Name = "heading 3", UiPriority = 9, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo5 = new LatentStyleExceptionInfo() { Name = "heading 4", UiPriority = 9, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo6 = new LatentStyleExceptionInfo() { Name = "heading 5", UiPriority = 9, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo7 = new LatentStyleExceptionInfo() { Name = "heading 6", UiPriority = 9, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo8 = new LatentStyleExceptionInfo() { Name = "heading 7", UiPriority = 9, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo9 = new LatentStyleExceptionInfo() { Name = "heading 8", UiPriority = 9, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo10 = new LatentStyleExceptionInfo() { Name = "heading 9", UiPriority = 9, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo11 = new LatentStyleExceptionInfo() { Name = "toc 1", UiPriority = 39 };
            LatentStyleExceptionInfo latentStyleExceptionInfo12 = new LatentStyleExceptionInfo() { Name = "toc 2", UiPriority = 39 };
            LatentStyleExceptionInfo latentStyleExceptionInfo13 = new LatentStyleExceptionInfo() { Name = "toc 3", UiPriority = 39 };
            LatentStyleExceptionInfo latentStyleExceptionInfo14 = new LatentStyleExceptionInfo() { Name = "toc 4", UiPriority = 39 };
            LatentStyleExceptionInfo latentStyleExceptionInfo15 = new LatentStyleExceptionInfo() { Name = "toc 5", UiPriority = 39 };
            LatentStyleExceptionInfo latentStyleExceptionInfo16 = new LatentStyleExceptionInfo() { Name = "toc 6", UiPriority = 39 };
            LatentStyleExceptionInfo latentStyleExceptionInfo17 = new LatentStyleExceptionInfo() { Name = "toc 7", UiPriority = 39 };
            LatentStyleExceptionInfo latentStyleExceptionInfo18 = new LatentStyleExceptionInfo() { Name = "toc 8", UiPriority = 39 };
            LatentStyleExceptionInfo latentStyleExceptionInfo19 = new LatentStyleExceptionInfo() { Name = "toc 9", UiPriority = 39 };
            LatentStyleExceptionInfo latentStyleExceptionInfo20 = new LatentStyleExceptionInfo() { Name = "caption", UiPriority = 35, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo21 = new LatentStyleExceptionInfo() { Name = "Title", UiPriority = 10, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo22 = new LatentStyleExceptionInfo() { Name = "Default Paragraph Font", UiPriority = 1 };
            LatentStyleExceptionInfo latentStyleExceptionInfo23 = new LatentStyleExceptionInfo() { Name = "Subtitle", UiPriority = 11, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo24 = new LatentStyleExceptionInfo() { Name = "Strong", UiPriority = 22, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo25 = new LatentStyleExceptionInfo() { Name = "Emphasis", UiPriority = 20, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo26 = new LatentStyleExceptionInfo() { Name = "Table Grid", UiPriority = 59, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo27 = new LatentStyleExceptionInfo() { Name = "Placeholder Text", UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo28 = new LatentStyleExceptionInfo() { Name = "No Spacing", UiPriority = 1, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo29 = new LatentStyleExceptionInfo() { Name = "Light Shading", UiPriority = 60, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo30 = new LatentStyleExceptionInfo() { Name = "Light List", UiPriority = 61, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo31 = new LatentStyleExceptionInfo() { Name = "Light Grid", UiPriority = 62, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo32 = new LatentStyleExceptionInfo() { Name = "Medium Shading 1", UiPriority = 63, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo33 = new LatentStyleExceptionInfo() { Name = "Medium Shading 2", UiPriority = 64, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo34 = new LatentStyleExceptionInfo() { Name = "Medium List 1", UiPriority = 65, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo35 = new LatentStyleExceptionInfo() { Name = "Medium List 2", UiPriority = 66, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo36 = new LatentStyleExceptionInfo() { Name = "Medium Grid 1", UiPriority = 67, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo37 = new LatentStyleExceptionInfo() { Name = "Medium Grid 2", UiPriority = 68, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo38 = new LatentStyleExceptionInfo() { Name = "Medium Grid 3", UiPriority = 69, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo39 = new LatentStyleExceptionInfo() { Name = "Dark List", UiPriority = 70, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo40 = new LatentStyleExceptionInfo() { Name = "Colorful Shading", UiPriority = 71, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo41 = new LatentStyleExceptionInfo() { Name = "Colorful List", UiPriority = 72, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo42 = new LatentStyleExceptionInfo() { Name = "Colorful Grid", UiPriority = 73, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo43 = new LatentStyleExceptionInfo() { Name = "Light Shading Accent 1", UiPriority = 60, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo44 = new LatentStyleExceptionInfo() { Name = "Light List Accent 1", UiPriority = 61, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo45 = new LatentStyleExceptionInfo() { Name = "Light Grid Accent 1", UiPriority = 62, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo46 = new LatentStyleExceptionInfo() { Name = "Medium Shading 1 Accent 1", UiPriority = 63, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo47 = new LatentStyleExceptionInfo() { Name = "Medium Shading 2 Accent 1", UiPriority = 64, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo48 = new LatentStyleExceptionInfo() { Name = "Medium List 1 Accent 1", UiPriority = 65, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo49 = new LatentStyleExceptionInfo() { Name = "Revision", UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo50 = new LatentStyleExceptionInfo() { Name = "List Paragraph", UiPriority = 34, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo51 = new LatentStyleExceptionInfo() { Name = "Quote", UiPriority = 29, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo52 = new LatentStyleExceptionInfo() { Name = "Intense Quote", UiPriority = 30, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo53 = new LatentStyleExceptionInfo() { Name = "Medium List 2 Accent 1", UiPriority = 66, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo54 = new LatentStyleExceptionInfo() { Name = "Medium Grid 1 Accent 1", UiPriority = 67, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo55 = new LatentStyleExceptionInfo() { Name = "Medium Grid 2 Accent 1", UiPriority = 68, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo56 = new LatentStyleExceptionInfo() { Name = "Medium Grid 3 Accent 1", UiPriority = 69, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo57 = new LatentStyleExceptionInfo() { Name = "Dark List Accent 1", UiPriority = 70, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo58 = new LatentStyleExceptionInfo() { Name = "Colorful Shading Accent 1", UiPriority = 71, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo59 = new LatentStyleExceptionInfo() { Name = "Colorful List Accent 1", UiPriority = 72, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo60 = new LatentStyleExceptionInfo() { Name = "Colorful Grid Accent 1", UiPriority = 73, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo61 = new LatentStyleExceptionInfo() { Name = "Light Shading Accent 2", UiPriority = 60, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo62 = new LatentStyleExceptionInfo() { Name = "Light List Accent 2", UiPriority = 61, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo63 = new LatentStyleExceptionInfo() { Name = "Light Grid Accent 2", UiPriority = 62, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo64 = new LatentStyleExceptionInfo() { Name = "Medium Shading 1 Accent 2", UiPriority = 63, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo65 = new LatentStyleExceptionInfo() { Name = "Medium Shading 2 Accent 2", UiPriority = 64, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo66 = new LatentStyleExceptionInfo() { Name = "Medium List 1 Accent 2", UiPriority = 65, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo67 = new LatentStyleExceptionInfo() { Name = "Medium List 2 Accent 2", UiPriority = 66, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo68 = new LatentStyleExceptionInfo() { Name = "Medium Grid 1 Accent 2", UiPriority = 67, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo69 = new LatentStyleExceptionInfo() { Name = "Medium Grid 2 Accent 2", UiPriority = 68, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo70 = new LatentStyleExceptionInfo() { Name = "Medium Grid 3 Accent 2", UiPriority = 69, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo71 = new LatentStyleExceptionInfo() { Name = "Dark List Accent 2", UiPriority = 70, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo72 = new LatentStyleExceptionInfo() { Name = "Colorful Shading Accent 2", UiPriority = 71, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo73 = new LatentStyleExceptionInfo() { Name = "Colorful List Accent 2", UiPriority = 72, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo74 = new LatentStyleExceptionInfo() { Name = "Colorful Grid Accent 2", UiPriority = 73, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo75 = new LatentStyleExceptionInfo() { Name = "Light Shading Accent 3", UiPriority = 60, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo76 = new LatentStyleExceptionInfo() { Name = "Light List Accent 3", UiPriority = 61, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo77 = new LatentStyleExceptionInfo() { Name = "Light Grid Accent 3", UiPriority = 62, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo78 = new LatentStyleExceptionInfo() { Name = "Medium Shading 1 Accent 3", UiPriority = 63, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo79 = new LatentStyleExceptionInfo() { Name = "Medium Shading 2 Accent 3", UiPriority = 64, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo80 = new LatentStyleExceptionInfo() { Name = "Medium List 1 Accent 3", UiPriority = 65, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo81 = new LatentStyleExceptionInfo() { Name = "Medium List 2 Accent 3", UiPriority = 66, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo82 = new LatentStyleExceptionInfo() { Name = "Medium Grid 1 Accent 3", UiPriority = 67, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo83 = new LatentStyleExceptionInfo() { Name = "Medium Grid 2 Accent 3", UiPriority = 68, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo84 = new LatentStyleExceptionInfo() { Name = "Medium Grid 3 Accent 3", UiPriority = 69, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo85 = new LatentStyleExceptionInfo() { Name = "Dark List Accent 3", UiPriority = 70, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo86 = new LatentStyleExceptionInfo() { Name = "Colorful Shading Accent 3", UiPriority = 71, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo87 = new LatentStyleExceptionInfo() { Name = "Colorful List Accent 3", UiPriority = 72, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo88 = new LatentStyleExceptionInfo() { Name = "Colorful Grid Accent 3", UiPriority = 73, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo89 = new LatentStyleExceptionInfo() { Name = "Light Shading Accent 4", UiPriority = 60, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo90 = new LatentStyleExceptionInfo() { Name = "Light List Accent 4", UiPriority = 61, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo91 = new LatentStyleExceptionInfo() { Name = "Light Grid Accent 4", UiPriority = 62, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo92 = new LatentStyleExceptionInfo() { Name = "Medium Shading 1 Accent 4", UiPriority = 63, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo93 = new LatentStyleExceptionInfo() { Name = "Medium Shading 2 Accent 4", UiPriority = 64, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo94 = new LatentStyleExceptionInfo() { Name = "Medium List 1 Accent 4", UiPriority = 65, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo95 = new LatentStyleExceptionInfo() { Name = "Medium List 2 Accent 4", UiPriority = 66, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo96 = new LatentStyleExceptionInfo() { Name = "Medium Grid 1 Accent 4", UiPriority = 67, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo97 = new LatentStyleExceptionInfo() { Name = "Medium Grid 2 Accent 4", UiPriority = 68, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo98 = new LatentStyleExceptionInfo() { Name = "Medium Grid 3 Accent 4", UiPriority = 69, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo99 = new LatentStyleExceptionInfo() { Name = "Dark List Accent 4", UiPriority = 70, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo100 = new LatentStyleExceptionInfo() { Name = "Colorful Shading Accent 4", UiPriority = 71, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo101 = new LatentStyleExceptionInfo() { Name = "Colorful List Accent 4", UiPriority = 72, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo102 = new LatentStyleExceptionInfo() { Name = "Colorful Grid Accent 4", UiPriority = 73, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo103 = new LatentStyleExceptionInfo() { Name = "Light Shading Accent 5", UiPriority = 60, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo104 = new LatentStyleExceptionInfo() { Name = "Light List Accent 5", UiPriority = 61, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo105 = new LatentStyleExceptionInfo() { Name = "Light Grid Accent 5", UiPriority = 62, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo106 = new LatentStyleExceptionInfo() { Name = "Medium Shading 1 Accent 5", UiPriority = 63, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo107 = new LatentStyleExceptionInfo() { Name = "Medium Shading 2 Accent 5", UiPriority = 64, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo108 = new LatentStyleExceptionInfo() { Name = "Medium List 1 Accent 5", UiPriority = 65, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo109 = new LatentStyleExceptionInfo() { Name = "Medium List 2 Accent 5", UiPriority = 66, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo110 = new LatentStyleExceptionInfo() { Name = "Medium Grid 1 Accent 5", UiPriority = 67, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo111 = new LatentStyleExceptionInfo() { Name = "Medium Grid 2 Accent 5", UiPriority = 68, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo112 = new LatentStyleExceptionInfo() { Name = "Medium Grid 3 Accent 5", UiPriority = 69, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo113 = new LatentStyleExceptionInfo() { Name = "Dark List Accent 5", UiPriority = 70, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo114 = new LatentStyleExceptionInfo() { Name = "Colorful Shading Accent 5", UiPriority = 71, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo115 = new LatentStyleExceptionInfo() { Name = "Colorful List Accent 5", UiPriority = 72, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo116 = new LatentStyleExceptionInfo() { Name = "Colorful Grid Accent 5", UiPriority = 73, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo117 = new LatentStyleExceptionInfo() { Name = "Light Shading Accent 6", UiPriority = 60, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo118 = new LatentStyleExceptionInfo() { Name = "Light List Accent 6", UiPriority = 61, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo119 = new LatentStyleExceptionInfo() { Name = "Light Grid Accent 6", UiPriority = 62, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo120 = new LatentStyleExceptionInfo() { Name = "Medium Shading 1 Accent 6", UiPriority = 63, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo121 = new LatentStyleExceptionInfo() { Name = "Medium Shading 2 Accent 6", UiPriority = 64, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo122 = new LatentStyleExceptionInfo() { Name = "Medium List 1 Accent 6", UiPriority = 65, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo123 = new LatentStyleExceptionInfo() { Name = "Medium List 2 Accent 6", UiPriority = 66, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo124 = new LatentStyleExceptionInfo() { Name = "Medium Grid 1 Accent 6", UiPriority = 67, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo125 = new LatentStyleExceptionInfo() { Name = "Medium Grid 2 Accent 6", UiPriority = 68, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo126 = new LatentStyleExceptionInfo() { Name = "Medium Grid 3 Accent 6", UiPriority = 69, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo127 = new LatentStyleExceptionInfo() { Name = "Dark List Accent 6", UiPriority = 70, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo128 = new LatentStyleExceptionInfo() { Name = "Colorful Shading Accent 6", UiPriority = 71, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo129 = new LatentStyleExceptionInfo() { Name = "Colorful List Accent 6", UiPriority = 72, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo130 = new LatentStyleExceptionInfo() { Name = "Colorful Grid Accent 6", UiPriority = 73, SemiHidden = false, UnhideWhenUsed = false };
            LatentStyleExceptionInfo latentStyleExceptionInfo131 = new LatentStyleExceptionInfo() { Name = "Subtle Emphasis", UiPriority = 19, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo132 = new LatentStyleExceptionInfo() { Name = "Intense Emphasis", UiPriority = 21, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo133 = new LatentStyleExceptionInfo() { Name = "Subtle Reference", UiPriority = 31, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo134 = new LatentStyleExceptionInfo() { Name = "Intense Reference", UiPriority = 32, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo135 = new LatentStyleExceptionInfo() { Name = "Book Title", UiPriority = 33, SemiHidden = false, UnhideWhenUsed = false, PrimaryStyle = true };
            LatentStyleExceptionInfo latentStyleExceptionInfo136 = new LatentStyleExceptionInfo() { Name = "Bibliography", UiPriority = 37 };
            LatentStyleExceptionInfo latentStyleExceptionInfo137 = new LatentStyleExceptionInfo() { Name = "TOC Heading", UiPriority = 39, PrimaryStyle = true };

            latentStyles1.Append(latentStyleExceptionInfo1);
            latentStyles1.Append(latentStyleExceptionInfo2);
            latentStyles1.Append(latentStyleExceptionInfo3);
            latentStyles1.Append(latentStyleExceptionInfo4);
            latentStyles1.Append(latentStyleExceptionInfo5);
            latentStyles1.Append(latentStyleExceptionInfo6);
            latentStyles1.Append(latentStyleExceptionInfo7);
            latentStyles1.Append(latentStyleExceptionInfo8);
            latentStyles1.Append(latentStyleExceptionInfo9);
            latentStyles1.Append(latentStyleExceptionInfo10);
            latentStyles1.Append(latentStyleExceptionInfo11);
            latentStyles1.Append(latentStyleExceptionInfo12);
            latentStyles1.Append(latentStyleExceptionInfo13);
            latentStyles1.Append(latentStyleExceptionInfo14);
            latentStyles1.Append(latentStyleExceptionInfo15);
            latentStyles1.Append(latentStyleExceptionInfo16);
            latentStyles1.Append(latentStyleExceptionInfo17);
            latentStyles1.Append(latentStyleExceptionInfo18);
            latentStyles1.Append(latentStyleExceptionInfo19);
            latentStyles1.Append(latentStyleExceptionInfo20);
            latentStyles1.Append(latentStyleExceptionInfo21);
            latentStyles1.Append(latentStyleExceptionInfo22);
            latentStyles1.Append(latentStyleExceptionInfo23);
            latentStyles1.Append(latentStyleExceptionInfo24);
            latentStyles1.Append(latentStyleExceptionInfo25);
            latentStyles1.Append(latentStyleExceptionInfo26);
            latentStyles1.Append(latentStyleExceptionInfo27);
            latentStyles1.Append(latentStyleExceptionInfo28);
            latentStyles1.Append(latentStyleExceptionInfo29);
            latentStyles1.Append(latentStyleExceptionInfo30);
            latentStyles1.Append(latentStyleExceptionInfo31);
            latentStyles1.Append(latentStyleExceptionInfo32);
            latentStyles1.Append(latentStyleExceptionInfo33);
            latentStyles1.Append(latentStyleExceptionInfo34);
            latentStyles1.Append(latentStyleExceptionInfo35);
            latentStyles1.Append(latentStyleExceptionInfo36);
            latentStyles1.Append(latentStyleExceptionInfo37);
            latentStyles1.Append(latentStyleExceptionInfo38);
            latentStyles1.Append(latentStyleExceptionInfo39);
            latentStyles1.Append(latentStyleExceptionInfo40);
            latentStyles1.Append(latentStyleExceptionInfo41);
            latentStyles1.Append(latentStyleExceptionInfo42);
            latentStyles1.Append(latentStyleExceptionInfo43);
            latentStyles1.Append(latentStyleExceptionInfo44);
            latentStyles1.Append(latentStyleExceptionInfo45);
            latentStyles1.Append(latentStyleExceptionInfo46);
            latentStyles1.Append(latentStyleExceptionInfo47);
            latentStyles1.Append(latentStyleExceptionInfo48);
            latentStyles1.Append(latentStyleExceptionInfo49);
            latentStyles1.Append(latentStyleExceptionInfo50);
            latentStyles1.Append(latentStyleExceptionInfo51);
            latentStyles1.Append(latentStyleExceptionInfo52);
            latentStyles1.Append(latentStyleExceptionInfo53);
            latentStyles1.Append(latentStyleExceptionInfo54);
            latentStyles1.Append(latentStyleExceptionInfo55);
            latentStyles1.Append(latentStyleExceptionInfo56);
            latentStyles1.Append(latentStyleExceptionInfo57);
            latentStyles1.Append(latentStyleExceptionInfo58);
            latentStyles1.Append(latentStyleExceptionInfo59);
            latentStyles1.Append(latentStyleExceptionInfo60);
            latentStyles1.Append(latentStyleExceptionInfo61);
            latentStyles1.Append(latentStyleExceptionInfo62);
            latentStyles1.Append(latentStyleExceptionInfo63);
            latentStyles1.Append(latentStyleExceptionInfo64);
            latentStyles1.Append(latentStyleExceptionInfo65);
            latentStyles1.Append(latentStyleExceptionInfo66);
            latentStyles1.Append(latentStyleExceptionInfo67);
            latentStyles1.Append(latentStyleExceptionInfo68);
            latentStyles1.Append(latentStyleExceptionInfo69);
            latentStyles1.Append(latentStyleExceptionInfo70);
            latentStyles1.Append(latentStyleExceptionInfo71);
            latentStyles1.Append(latentStyleExceptionInfo72);
            latentStyles1.Append(latentStyleExceptionInfo73);
            latentStyles1.Append(latentStyleExceptionInfo74);
            latentStyles1.Append(latentStyleExceptionInfo75);
            latentStyles1.Append(latentStyleExceptionInfo76);
            latentStyles1.Append(latentStyleExceptionInfo77);
            latentStyles1.Append(latentStyleExceptionInfo78);
            latentStyles1.Append(latentStyleExceptionInfo79);
            latentStyles1.Append(latentStyleExceptionInfo80);
            latentStyles1.Append(latentStyleExceptionInfo81);
            latentStyles1.Append(latentStyleExceptionInfo82);
            latentStyles1.Append(latentStyleExceptionInfo83);
            latentStyles1.Append(latentStyleExceptionInfo84);
            latentStyles1.Append(latentStyleExceptionInfo85);
            latentStyles1.Append(latentStyleExceptionInfo86);
            latentStyles1.Append(latentStyleExceptionInfo87);
            latentStyles1.Append(latentStyleExceptionInfo88);
            latentStyles1.Append(latentStyleExceptionInfo89);
            latentStyles1.Append(latentStyleExceptionInfo90);
            latentStyles1.Append(latentStyleExceptionInfo91);
            latentStyles1.Append(latentStyleExceptionInfo92);
            latentStyles1.Append(latentStyleExceptionInfo93);
            latentStyles1.Append(latentStyleExceptionInfo94);
            latentStyles1.Append(latentStyleExceptionInfo95);
            latentStyles1.Append(latentStyleExceptionInfo96);
            latentStyles1.Append(latentStyleExceptionInfo97);
            latentStyles1.Append(latentStyleExceptionInfo98);
            latentStyles1.Append(latentStyleExceptionInfo99);
            latentStyles1.Append(latentStyleExceptionInfo100);
            latentStyles1.Append(latentStyleExceptionInfo101);
            latentStyles1.Append(latentStyleExceptionInfo102);
            latentStyles1.Append(latentStyleExceptionInfo103);
            latentStyles1.Append(latentStyleExceptionInfo104);
            latentStyles1.Append(latentStyleExceptionInfo105);
            latentStyles1.Append(latentStyleExceptionInfo106);
            latentStyles1.Append(latentStyleExceptionInfo107);
            latentStyles1.Append(latentStyleExceptionInfo108);
            latentStyles1.Append(latentStyleExceptionInfo109);
            latentStyles1.Append(latentStyleExceptionInfo110);
            latentStyles1.Append(latentStyleExceptionInfo111);
            latentStyles1.Append(latentStyleExceptionInfo112);
            latentStyles1.Append(latentStyleExceptionInfo113);
            latentStyles1.Append(latentStyleExceptionInfo114);
            latentStyles1.Append(latentStyleExceptionInfo115);
            latentStyles1.Append(latentStyleExceptionInfo116);
            latentStyles1.Append(latentStyleExceptionInfo117);
            latentStyles1.Append(latentStyleExceptionInfo118);
            latentStyles1.Append(latentStyleExceptionInfo119);
            latentStyles1.Append(latentStyleExceptionInfo120);
            latentStyles1.Append(latentStyleExceptionInfo121);
            latentStyles1.Append(latentStyleExceptionInfo122);
            latentStyles1.Append(latentStyleExceptionInfo123);
            latentStyles1.Append(latentStyleExceptionInfo124);
            latentStyles1.Append(latentStyleExceptionInfo125);
            latentStyles1.Append(latentStyleExceptionInfo126);
            latentStyles1.Append(latentStyleExceptionInfo127);
            latentStyles1.Append(latentStyleExceptionInfo128);
            latentStyles1.Append(latentStyleExceptionInfo129);
            latentStyles1.Append(latentStyleExceptionInfo130);
            latentStyles1.Append(latentStyleExceptionInfo131);
            latentStyles1.Append(latentStyleExceptionInfo132);
            latentStyles1.Append(latentStyleExceptionInfo133);
            latentStyles1.Append(latentStyleExceptionInfo134);
            latentStyles1.Append(latentStyleExceptionInfo135);
            latentStyles1.Append(latentStyleExceptionInfo136);
            latentStyles1.Append(latentStyleExceptionInfo137);

            Style style1 = new Style() { Type = StyleValues.Paragraph, StyleId = "Normal", Default = true };
            StyleName styleName1 = new StyleName() { Val = "Normal" };
            PrimaryStyle primaryStyle1 = new PrimaryStyle();
            Rsid rsid1 = new Rsid() { Val = "00BA40EF" };

            StyleParagraphProperties styleParagraphProperties1 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "0" };

            styleParagraphProperties1.Append(spacingBetweenLines2);

            style1.Append(styleName1);
            style1.Append(primaryStyle1);
            style1.Append(rsid1);
            style1.Append(styleParagraphProperties1);

            Style style2 = new Style() { Type = StyleValues.Paragraph, StyleId = "Heading1" };
            StyleName styleName2 = new StyleName() { Val = "heading 1" };
            BasedOn basedOn1 = new BasedOn() { Val = "Normal" };
            NextParagraphStyle nextParagraphStyle1 = new NextParagraphStyle() { Val = "Normal" };
            LinkedStyle linkedStyle1 = new LinkedStyle() { Val = "Heading1Char" };
            UIPriority uIPriority1 = new UIPriority() { Val = 9 };
            PrimaryStyle primaryStyle2 = new PrimaryStyle();
            Rsid rsid2 = new Rsid() { Val = "0016335E" };

            StyleParagraphProperties styleParagraphProperties2 = new StyleParagraphProperties();
            KeepNext keepNext1 = new KeepNext();
            KeepLines keepLines1 = new KeepLines();
            SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines() { Before = "480" };
            OutlineLevel outlineLevel1 = new OutlineLevel() { Val = 0 };

            styleParagraphProperties2.Append(keepNext1);
            styleParagraphProperties2.Append(keepLines1);
            styleParagraphProperties2.Append(spacingBetweenLines3);
            styleParagraphProperties2.Append(outlineLevel1);

            StyleRunProperties styleRunProperties1 = new StyleRunProperties();
            RunFonts runFonts2 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold1 = new Bold();
            BoldComplexScript boldComplexScript1 = new BoldComplexScript();
            Color color1 = new Color() { Val = "365F91", ThemeColor = ThemeColorValues.Accent1, ThemeShade = "BF" };
            FontSize fontSize2 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" };

            styleRunProperties1.Append(runFonts2);
            styleRunProperties1.Append(bold1);
            styleRunProperties1.Append(boldComplexScript1);
            styleRunProperties1.Append(color1);
            styleRunProperties1.Append(fontSize2);
            styleRunProperties1.Append(fontSizeComplexScript2);

            style2.Append(styleName2);
            style2.Append(basedOn1);
            style2.Append(nextParagraphStyle1);
            style2.Append(linkedStyle1);
            style2.Append(uIPriority1);
            style2.Append(primaryStyle2);
            style2.Append(rsid2);
            style2.Append(styleParagraphProperties2);
            style2.Append(styleRunProperties1);

            Style style3 = new Style() { Type = StyleValues.Paragraph, StyleId = "Heading2" };
            StyleName styleName3 = new StyleName() { Val = "heading 2" };
            BasedOn basedOn2 = new BasedOn() { Val = "Normal" };
            NextParagraphStyle nextParagraphStyle2 = new NextParagraphStyle() { Val = "Normal" };
            LinkedStyle linkedStyle2 = new LinkedStyle() { Val = "Heading2Char" };
            UIPriority uIPriority2 = new UIPriority() { Val = 9 };
            UnhideWhenUsed unhideWhenUsed1 = new UnhideWhenUsed();
            PrimaryStyle primaryStyle3 = new PrimaryStyle();
            Rsid rsid3 = new Rsid() { Val = "0016335E" };

            StyleParagraphProperties styleParagraphProperties3 = new StyleParagraphProperties();
            KeepNext keepNext2 = new KeepNext();
            KeepLines keepLines2 = new KeepLines();
            SpacingBetweenLines spacingBetweenLines4 = new SpacingBetweenLines() { Before = "200" };
            OutlineLevel outlineLevel2 = new OutlineLevel() { Val = 1 };

            styleParagraphProperties3.Append(keepNext2);
            styleParagraphProperties3.Append(keepLines2);
            styleParagraphProperties3.Append(spacingBetweenLines4);
            styleParagraphProperties3.Append(outlineLevel2);

            StyleRunProperties styleRunProperties2 = new StyleRunProperties();
            RunFonts runFonts3 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold2 = new Bold();
            BoldComplexScript boldComplexScript2 = new BoldComplexScript();
            Color color2 = new Color() { Val = "4F81BD", ThemeColor = ThemeColorValues.Accent1 };
            FontSize fontSize3 = new FontSize() { Val = "26" };
            FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "26" };

            styleRunProperties2.Append(runFonts3);
            styleRunProperties2.Append(bold2);
            styleRunProperties2.Append(boldComplexScript2);
            styleRunProperties2.Append(color2);
            styleRunProperties2.Append(fontSize3);
            styleRunProperties2.Append(fontSizeComplexScript3);

            style3.Append(styleName3);
            style3.Append(basedOn2);
            style3.Append(nextParagraphStyle2);
            style3.Append(linkedStyle2);
            style3.Append(uIPriority2);
            style3.Append(unhideWhenUsed1);
            style3.Append(primaryStyle3);
            style3.Append(rsid3);
            style3.Append(styleParagraphProperties3);
            style3.Append(styleRunProperties2);

            Style style4 = new Style() { Type = StyleValues.Paragraph, StyleId = "Heading3" };
            StyleName styleName4 = new StyleName() { Val = "heading 3" };
            BasedOn basedOn3 = new BasedOn() { Val = "Normal" };
            NextParagraphStyle nextParagraphStyle3 = new NextParagraphStyle() { Val = "Normal" };
            LinkedStyle linkedStyle3 = new LinkedStyle() { Val = "Heading3Char" };
            UIPriority uIPriority3 = new UIPriority() { Val = 9 };
            UnhideWhenUsed unhideWhenUsed2 = new UnhideWhenUsed();
            PrimaryStyle primaryStyle4 = new PrimaryStyle();
            Rsid rsid4 = new Rsid() { Val = "0016335E" };

            StyleParagraphProperties styleParagraphProperties4 = new StyleParagraphProperties();
            KeepNext keepNext3 = new KeepNext();
            KeepLines keepLines3 = new KeepLines();
            SpacingBetweenLines spacingBetweenLines5 = new SpacingBetweenLines() { Before = "200" };
            OutlineLevel outlineLevel3 = new OutlineLevel() { Val = 2 };

            styleParagraphProperties4.Append(keepNext3);
            styleParagraphProperties4.Append(keepLines3);
            styleParagraphProperties4.Append(spacingBetweenLines5);
            styleParagraphProperties4.Append(outlineLevel3);

            StyleRunProperties styleRunProperties3 = new StyleRunProperties();
            RunFonts runFonts4 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold3 = new Bold();
            BoldComplexScript boldComplexScript3 = new BoldComplexScript();
            Color color3 = new Color() { Val = "4F81BD", ThemeColor = ThemeColorValues.Accent1 };

            styleRunProperties3.Append(runFonts4);
            styleRunProperties3.Append(bold3);
            styleRunProperties3.Append(boldComplexScript3);
            styleRunProperties3.Append(color3);

            style4.Append(styleName4);
            style4.Append(basedOn3);
            style4.Append(nextParagraphStyle3);
            style4.Append(linkedStyle3);
            style4.Append(uIPriority3);
            style4.Append(unhideWhenUsed2);
            style4.Append(primaryStyle4);
            style4.Append(rsid4);
            style4.Append(styleParagraphProperties4);
            style4.Append(styleRunProperties3);

            Style style5 = new Style() { Type = StyleValues.Character, StyleId = "DefaultParagraphFont", Default = true };
            StyleName styleName5 = new StyleName() { Val = "Default Paragraph Font" };
            UIPriority uIPriority4 = new UIPriority() { Val = 1 };
            SemiHidden semiHidden1 = new SemiHidden();
            UnhideWhenUsed unhideWhenUsed3 = new UnhideWhenUsed();

            style5.Append(styleName5);
            style5.Append(uIPriority4);
            style5.Append(semiHidden1);
            style5.Append(unhideWhenUsed3);

            Style style6 = new Style() { Type = StyleValues.Table, StyleId = "TableNormal", Default = true };
            StyleName styleName6 = new StyleName() { Val = "Normal Table" };
            UIPriority uIPriority5 = new UIPriority() { Val = 99 };
            SemiHidden semiHidden2 = new SemiHidden();
            UnhideWhenUsed unhideWhenUsed4 = new UnhideWhenUsed();
            PrimaryStyle primaryStyle5 = new PrimaryStyle();

            StyleTableProperties styleTableProperties1 = new StyleTableProperties();
            TableIndentation tableIndentation1 = new TableIndentation() { Width = 0, Type = TableWidthUnitValues.Dxa };

            TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault();
            TopMargin topMargin1 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellLeftMargin tableCellLeftMargin1 = new TableCellLeftMargin() { Width = 108, Type = TableWidthValues.Dxa };
            BottomMargin bottomMargin1 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin() { Width = 108, Type = TableWidthValues.Dxa };

            tableCellMarginDefault1.Append(topMargin1);
            tableCellMarginDefault1.Append(tableCellLeftMargin1);
            tableCellMarginDefault1.Append(bottomMargin1);
            tableCellMarginDefault1.Append(tableCellRightMargin1);

            styleTableProperties1.Append(tableIndentation1);
            styleTableProperties1.Append(tableCellMarginDefault1);

            style6.Append(styleName6);
            style6.Append(uIPriority5);
            style6.Append(semiHidden2);
            style6.Append(unhideWhenUsed4);
            style6.Append(primaryStyle5);
            style6.Append(styleTableProperties1);

            Style style7 = new Style() { Type = StyleValues.Numbering, StyleId = "NoList", Default = true };
            StyleName styleName7 = new StyleName() { Val = "No List" };
            UIPriority uIPriority6 = new UIPriority() { Val = 99 };
            SemiHidden semiHidden3 = new SemiHidden();
            UnhideWhenUsed unhideWhenUsed5 = new UnhideWhenUsed();

            style7.Append(styleName7);
            style7.Append(uIPriority6);
            style7.Append(semiHidden3);
            style7.Append(unhideWhenUsed5);

            Style style8 = new Style() { Type = StyleValues.Character, StyleId = "Heading1Char", CustomStyle = true };
            StyleName styleName8 = new StyleName() { Val = "Heading 1 Char" };
            BasedOn basedOn4 = new BasedOn() { Val = "DefaultParagraphFont" };
            LinkedStyle linkedStyle4 = new LinkedStyle() { Val = "Heading1" };
            UIPriority uIPriority7 = new UIPriority() { Val = 9 };
            Rsid rsid5 = new Rsid() { Val = "0016335E" };

            StyleRunProperties styleRunProperties4 = new StyleRunProperties();
            RunFonts runFonts5 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold4 = new Bold();
            BoldComplexScript boldComplexScript4 = new BoldComplexScript();
            Color color4 = new Color() { Val = "365F91", ThemeColor = ThemeColorValues.Accent1, ThemeShade = "BF" };
            FontSize fontSize4 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "28" };

            styleRunProperties4.Append(runFonts5);
            styleRunProperties4.Append(bold4);
            styleRunProperties4.Append(boldComplexScript4);
            styleRunProperties4.Append(color4);
            styleRunProperties4.Append(fontSize4);
            styleRunProperties4.Append(fontSizeComplexScript4);

            style8.Append(styleName8);
            style8.Append(basedOn4);
            style8.Append(linkedStyle4);
            style8.Append(uIPriority7);
            style8.Append(rsid5);
            style8.Append(styleRunProperties4);

            Style style9 = new Style() { Type = StyleValues.Character, StyleId = "Heading2Char", CustomStyle = true };
            StyleName styleName9 = new StyleName() { Val = "Heading 2 Char" };
            BasedOn basedOn5 = new BasedOn() { Val = "DefaultParagraphFont" };
            LinkedStyle linkedStyle5 = new LinkedStyle() { Val = "Heading2" };
            UIPriority uIPriority8 = new UIPriority() { Val = 9 };
            Rsid rsid6 = new Rsid() { Val = "0016335E" };

            StyleRunProperties styleRunProperties5 = new StyleRunProperties();
            RunFonts runFonts6 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold5 = new Bold();
            BoldComplexScript boldComplexScript5 = new BoldComplexScript();
            Color color5 = new Color() { Val = "4F81BD", ThemeColor = ThemeColorValues.Accent1 };
            FontSize fontSize5 = new FontSize() { Val = "26" };
            FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "26" };

            styleRunProperties5.Append(runFonts6);
            styleRunProperties5.Append(bold5);
            styleRunProperties5.Append(boldComplexScript5);
            styleRunProperties5.Append(color5);
            styleRunProperties5.Append(fontSize5);
            styleRunProperties5.Append(fontSizeComplexScript5);

            style9.Append(styleName9);
            style9.Append(basedOn5);
            style9.Append(linkedStyle5);
            style9.Append(uIPriority8);
            style9.Append(rsid6);
            style9.Append(styleRunProperties5);

            Style style10 = new Style() { Type = StyleValues.Character, StyleId = "Heading3Char", CustomStyle = true };
            StyleName styleName10 = new StyleName() { Val = "Heading 3 Char" };
            BasedOn basedOn6 = new BasedOn() { Val = "DefaultParagraphFont" };
            LinkedStyle linkedStyle6 = new LinkedStyle() { Val = "Heading3" };
            UIPriority uIPriority9 = new UIPriority() { Val = 9 };
            Rsid rsid7 = new Rsid() { Val = "0016335E" };

            StyleRunProperties styleRunProperties6 = new StyleRunProperties();
            RunFonts runFonts7 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold6 = new Bold();
            BoldComplexScript boldComplexScript6 = new BoldComplexScript();
            Color color6 = new Color() { Val = "4F81BD", ThemeColor = ThemeColorValues.Accent1 };

            styleRunProperties6.Append(runFonts7);
            styleRunProperties6.Append(bold6);
            styleRunProperties6.Append(boldComplexScript6);
            styleRunProperties6.Append(color6);

            style10.Append(styleName10);
            style10.Append(basedOn6);
            style10.Append(linkedStyle6);
            style10.Append(uIPriority9);
            style10.Append(rsid7);
            style10.Append(styleRunProperties6);

            Style style11 = new Style() { Type = StyleValues.Table, StyleId = "TableGrid" };
            StyleName styleName11 = new StyleName() { Val = "Table Grid" };
            BasedOn basedOn7 = new BasedOn() { Val = "TableNormal" };
            UIPriority uIPriority10 = new UIPriority() { Val = 59 };
            Rsid rsid8 = new Rsid() { Val = "00BA40EF" };

            StyleParagraphProperties styleParagraphProperties5 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines6 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties5.Append(spacingBetweenLines6);

            StyleTableProperties styleTableProperties2 = new StyleTableProperties();
            TableIndentation tableIndentation2 = new TableIndentation() { Width = 0, Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);

            TableCellMarginDefault tableCellMarginDefault2 = new TableCellMarginDefault();
            TopMargin topMargin2 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellLeftMargin tableCellLeftMargin2 = new TableCellLeftMargin() { Width = 108, Type = TableWidthValues.Dxa };
            BottomMargin bottomMargin2 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellRightMargin tableCellRightMargin2 = new TableCellRightMargin() { Width = 108, Type = TableWidthValues.Dxa };

            tableCellMarginDefault2.Append(topMargin2);
            tableCellMarginDefault2.Append(tableCellLeftMargin2);
            tableCellMarginDefault2.Append(bottomMargin2);
            tableCellMarginDefault2.Append(tableCellRightMargin2);

            styleTableProperties2.Append(tableIndentation2);
            styleTableProperties2.Append(tableBorders1);
            styleTableProperties2.Append(tableCellMarginDefault2);

            style11.Append(styleName11);
            style11.Append(basedOn7);
            style11.Append(uIPriority10);
            style11.Append(rsid8);
            style11.Append(styleParagraphProperties5);
            style11.Append(styleTableProperties2);

            Style style12 = new Style() { Type = StyleValues.Table, StyleId = "LightList-Accent1" };
            StyleName styleName12 = new StyleName() { Val = "Light List Accent 1" };
            BasedOn basedOn8 = new BasedOn() { Val = "TableNormal" };
            UIPriority uIPriority11 = new UIPriority() { Val = 61 };
            Rsid rsid9 = new Rsid() { Val = "00BA40EF" };

            StyleParagraphProperties styleParagraphProperties6 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines7 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties6.Append(spacingBetweenLines7);

            StyleTableProperties styleTableProperties3 = new StyleTableProperties();
            TableStyleRowBandSize tableStyleRowBandSize1 = new TableStyleRowBandSize() { Val = 1 };
            TableStyleColumnBandSize tableStyleColumnBandSize1 = new TableStyleColumnBandSize() { Val = 1 };
            TableIndentation tableIndentation3 = new TableIndentation() { Width = 0, Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders2 = new TableBorders();
            TopBorder topBorder2 = new TopBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder2 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder2 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder2 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableBorders2.Append(topBorder2);
            tableBorders2.Append(leftBorder2);
            tableBorders2.Append(bottomBorder2);
            tableBorders2.Append(rightBorder2);

            TableCellMarginDefault tableCellMarginDefault3 = new TableCellMarginDefault();
            TopMargin topMargin3 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellLeftMargin tableCellLeftMargin3 = new TableCellLeftMargin() { Width = 108, Type = TableWidthValues.Dxa };
            BottomMargin bottomMargin3 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellRightMargin tableCellRightMargin3 = new TableCellRightMargin() { Width = 108, Type = TableWidthValues.Dxa };

            tableCellMarginDefault3.Append(topMargin3);
            tableCellMarginDefault3.Append(tableCellLeftMargin3);
            tableCellMarginDefault3.Append(bottomMargin3);
            tableCellMarginDefault3.Append(tableCellRightMargin3);

            styleTableProperties3.Append(tableStyleRowBandSize1);
            styleTableProperties3.Append(tableStyleColumnBandSize1);
            styleTableProperties3.Append(tableIndentation3);
            styleTableProperties3.Append(tableBorders2);
            styleTableProperties3.Append(tableCellMarginDefault3);

            TableStyleProperties tableStyleProperties1 = new TableStyleProperties() { Type = TableStyleOverrideValues.FirstRow };

            StyleParagraphProperties styleParagraphProperties7 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines8 = new SpacingBetweenLines() { Before = "0", After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties7.Append(spacingBetweenLines8);

            RunPropertiesBaseStyle runPropertiesBaseStyle2 = new RunPropertiesBaseStyle();
            Bold bold7 = new Bold();
            BoldComplexScript boldComplexScript7 = new BoldComplexScript();
            Color color7 = new Color() { Val = "FFFFFF", ThemeColor = ThemeColorValues.Background1 };

            runPropertiesBaseStyle2.Append(bold7);
            runPropertiesBaseStyle2.Append(boldComplexScript7);
            runPropertiesBaseStyle2.Append(color7);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties1 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties1 = new TableStyleConditionalFormattingTableCellProperties();
            Shading shading1 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "4F81BD", ThemeFill = ThemeColorValues.Accent1 };

            tableStyleConditionalFormattingTableCellProperties1.Append(shading1);

            tableStyleProperties1.Append(styleParagraphProperties7);
            tableStyleProperties1.Append(runPropertiesBaseStyle2);
            tableStyleProperties1.Append(tableStyleConditionalFormattingTableProperties1);
            tableStyleProperties1.Append(tableStyleConditionalFormattingTableCellProperties1);

            TableStyleProperties tableStyleProperties2 = new TableStyleProperties() { Type = TableStyleOverrideValues.LastRow };

            StyleParagraphProperties styleParagraphProperties8 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines9 = new SpacingBetweenLines() { Before = "0", After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties8.Append(spacingBetweenLines9);

            RunPropertiesBaseStyle runPropertiesBaseStyle3 = new RunPropertiesBaseStyle();
            Bold bold8 = new Bold();
            BoldComplexScript boldComplexScript8 = new BoldComplexScript();

            runPropertiesBaseStyle3.Append(bold8);
            runPropertiesBaseStyle3.Append(boldComplexScript8);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties2 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties2 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders1 = new TableCellBorders();
            TopBorder topBorder3 = new TopBorder() { Val = BorderValues.Double, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)6U, Space = (UInt32Value)0U };
            LeftBorder leftBorder3 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder3 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder3 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders1.Append(topBorder3);
            tableCellBorders1.Append(leftBorder3);
            tableCellBorders1.Append(bottomBorder3);
            tableCellBorders1.Append(rightBorder3);

            tableStyleConditionalFormattingTableCellProperties2.Append(tableCellBorders1);

            tableStyleProperties2.Append(styleParagraphProperties8);
            tableStyleProperties2.Append(runPropertiesBaseStyle3);
            tableStyleProperties2.Append(tableStyleConditionalFormattingTableProperties2);
            tableStyleProperties2.Append(tableStyleConditionalFormattingTableCellProperties2);

            TableStyleProperties tableStyleProperties3 = new TableStyleProperties() { Type = TableStyleOverrideValues.FirstColumn };

            RunPropertiesBaseStyle runPropertiesBaseStyle4 = new RunPropertiesBaseStyle();
            Bold bold9 = new Bold();
            BoldComplexScript boldComplexScript9 = new BoldComplexScript();

            runPropertiesBaseStyle4.Append(bold9);
            runPropertiesBaseStyle4.Append(boldComplexScript9);

            tableStyleProperties3.Append(runPropertiesBaseStyle4);

            TableStyleProperties tableStyleProperties4 = new TableStyleProperties() { Type = TableStyleOverrideValues.LastColumn };

            RunPropertiesBaseStyle runPropertiesBaseStyle5 = new RunPropertiesBaseStyle();
            Bold bold10 = new Bold();
            BoldComplexScript boldComplexScript10 = new BoldComplexScript();

            runPropertiesBaseStyle5.Append(bold10);
            runPropertiesBaseStyle5.Append(boldComplexScript10);

            tableStyleProperties4.Append(runPropertiesBaseStyle5);

            TableStyleProperties tableStyleProperties5 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band1Vertical };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties3 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties3 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders2 = new TableCellBorders();
            TopBorder topBorder4 = new TopBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder4 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder4 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder4 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders2.Append(topBorder4);
            tableCellBorders2.Append(leftBorder4);
            tableCellBorders2.Append(bottomBorder4);
            tableCellBorders2.Append(rightBorder4);

            tableStyleConditionalFormattingTableCellProperties3.Append(tableCellBorders2);

            tableStyleProperties5.Append(tableStyleConditionalFormattingTableProperties3);
            tableStyleProperties5.Append(tableStyleConditionalFormattingTableCellProperties3);

            TableStyleProperties tableStyleProperties6 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band1Horizontal };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties4 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties4 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders3 = new TableCellBorders();
            TopBorder topBorder5 = new TopBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder5 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder5 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder5 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders3.Append(topBorder5);
            tableCellBorders3.Append(leftBorder5);
            tableCellBorders3.Append(bottomBorder5);
            tableCellBorders3.Append(rightBorder5);

            tableStyleConditionalFormattingTableCellProperties4.Append(tableCellBorders3);

            tableStyleProperties6.Append(tableStyleConditionalFormattingTableProperties4);
            tableStyleProperties6.Append(tableStyleConditionalFormattingTableCellProperties4);

            style12.Append(styleName12);
            style12.Append(basedOn8);
            style12.Append(uIPriority11);
            style12.Append(rsid9);
            style12.Append(styleParagraphProperties6);
            style12.Append(styleTableProperties3);
            style12.Append(tableStyleProperties1);
            style12.Append(tableStyleProperties2);
            style12.Append(tableStyleProperties3);
            style12.Append(tableStyleProperties4);
            style12.Append(tableStyleProperties5);
            style12.Append(tableStyleProperties6);

            Style style13 = new Style() { Type = StyleValues.Table, StyleId = "MediumGrid3-Accent1" };
            StyleName styleName13 = new StyleName() { Val = "Medium Grid 3 Accent 1" };
            BasedOn basedOn9 = new BasedOn() { Val = "TableNormal" };
            UIPriority uIPriority12 = new UIPriority() { Val = 69 };
            Rsid rsid10 = new Rsid() { Val = "00BA40EF" };

            StyleParagraphProperties styleParagraphProperties9 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines10 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties9.Append(spacingBetweenLines10);

            StyleTableProperties styleTableProperties4 = new StyleTableProperties();
            TableStyleRowBandSize tableStyleRowBandSize2 = new TableStyleRowBandSize() { Val = 1 };
            TableStyleColumnBandSize tableStyleColumnBandSize2 = new TableStyleColumnBandSize() { Val = 1 };
            TableIndentation tableIndentation4 = new TableIndentation() { Width = 0, Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders3 = new TableBorders();
            TopBorder topBorder6 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder6 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder6 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder6 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder2 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)6U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder2 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)6U, Space = (UInt32Value)0U };

            tableBorders3.Append(topBorder6);
            tableBorders3.Append(leftBorder6);
            tableBorders3.Append(bottomBorder6);
            tableBorders3.Append(rightBorder6);
            tableBorders3.Append(insideHorizontalBorder2);
            tableBorders3.Append(insideVerticalBorder2);

            TableCellMarginDefault tableCellMarginDefault4 = new TableCellMarginDefault();
            TopMargin topMargin4 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellLeftMargin tableCellLeftMargin4 = new TableCellLeftMargin() { Width = 108, Type = TableWidthValues.Dxa };
            BottomMargin bottomMargin4 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellRightMargin tableCellRightMargin4 = new TableCellRightMargin() { Width = 108, Type = TableWidthValues.Dxa };

            tableCellMarginDefault4.Append(topMargin4);
            tableCellMarginDefault4.Append(tableCellLeftMargin4);
            tableCellMarginDefault4.Append(bottomMargin4);
            tableCellMarginDefault4.Append(tableCellRightMargin4);

            styleTableProperties4.Append(tableStyleRowBandSize2);
            styleTableProperties4.Append(tableStyleColumnBandSize2);
            styleTableProperties4.Append(tableIndentation4);
            styleTableProperties4.Append(tableBorders3);
            styleTableProperties4.Append(tableCellMarginDefault4);

            StyleTableCellProperties styleTableCellProperties1 = new StyleTableCellProperties();
            Shading shading2 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D3DFEE", ThemeFill = ThemeColorValues.Accent1, ThemeFillTint = "3F" };

            styleTableCellProperties1.Append(shading2);

            TableStyleProperties tableStyleProperties7 = new TableStyleProperties() { Type = TableStyleOverrideValues.FirstRow };

            RunPropertiesBaseStyle runPropertiesBaseStyle6 = new RunPropertiesBaseStyle();
            Bold bold11 = new Bold();
            BoldComplexScript boldComplexScript11 = new BoldComplexScript();
            Italic italic1 = new Italic() { Val = false };
            ItalicComplexScript italicComplexScript1 = new ItalicComplexScript() { Val = false };
            Color color8 = new Color() { Val = "FFFFFF", ThemeColor = ThemeColorValues.Background1 };

            runPropertiesBaseStyle6.Append(bold11);
            runPropertiesBaseStyle6.Append(boldComplexScript11);
            runPropertiesBaseStyle6.Append(italic1);
            runPropertiesBaseStyle6.Append(italicComplexScript1);
            runPropertiesBaseStyle6.Append(color8);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties5 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties5 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders4 = new TableCellBorders();
            TopBorder topBorder7 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder7 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder7 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)24U, Space = (UInt32Value)0U };
            RightBorder rightBorder7 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder3 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder3 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders4.Append(topBorder7);
            tableCellBorders4.Append(leftBorder7);
            tableCellBorders4.Append(bottomBorder7);
            tableCellBorders4.Append(rightBorder7);
            tableCellBorders4.Append(insideHorizontalBorder3);
            tableCellBorders4.Append(insideVerticalBorder3);
            Shading shading3 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "4F81BD", ThemeFill = ThemeColorValues.Accent1 };

            tableStyleConditionalFormattingTableCellProperties5.Append(tableCellBorders4);
            tableStyleConditionalFormattingTableCellProperties5.Append(shading3);

            tableStyleProperties7.Append(runPropertiesBaseStyle6);
            tableStyleProperties7.Append(tableStyleConditionalFormattingTableProperties5);
            tableStyleProperties7.Append(tableStyleConditionalFormattingTableCellProperties5);

            TableStyleProperties tableStyleProperties8 = new TableStyleProperties() { Type = TableStyleOverrideValues.LastRow };

            RunPropertiesBaseStyle runPropertiesBaseStyle7 = new RunPropertiesBaseStyle();
            Bold bold12 = new Bold();
            BoldComplexScript boldComplexScript12 = new BoldComplexScript();
            Italic italic2 = new Italic() { Val = false };
            ItalicComplexScript italicComplexScript2 = new ItalicComplexScript() { Val = false };
            Color color9 = new Color() { Val = "FFFFFF", ThemeColor = ThemeColorValues.Background1 };

            runPropertiesBaseStyle7.Append(bold12);
            runPropertiesBaseStyle7.Append(boldComplexScript12);
            runPropertiesBaseStyle7.Append(italic2);
            runPropertiesBaseStyle7.Append(italicComplexScript2);
            runPropertiesBaseStyle7.Append(color9);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties6 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties6 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders5 = new TableCellBorders();
            TopBorder topBorder8 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)24U, Space = (UInt32Value)0U };
            LeftBorder leftBorder8 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder8 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder8 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder4 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder4 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders5.Append(topBorder8);
            tableCellBorders5.Append(leftBorder8);
            tableCellBorders5.Append(bottomBorder8);
            tableCellBorders5.Append(rightBorder8);
            tableCellBorders5.Append(insideHorizontalBorder4);
            tableCellBorders5.Append(insideVerticalBorder4);
            Shading shading4 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "4F81BD", ThemeFill = ThemeColorValues.Accent1 };

            tableStyleConditionalFormattingTableCellProperties6.Append(tableCellBorders5);
            tableStyleConditionalFormattingTableCellProperties6.Append(shading4);

            tableStyleProperties8.Append(runPropertiesBaseStyle7);
            tableStyleProperties8.Append(tableStyleConditionalFormattingTableProperties6);
            tableStyleProperties8.Append(tableStyleConditionalFormattingTableCellProperties6);

            TableStyleProperties tableStyleProperties9 = new TableStyleProperties() { Type = TableStyleOverrideValues.FirstColumn };

            RunPropertiesBaseStyle runPropertiesBaseStyle8 = new RunPropertiesBaseStyle();
            Bold bold13 = new Bold();
            BoldComplexScript boldComplexScript13 = new BoldComplexScript();
            Italic italic3 = new Italic() { Val = false };
            ItalicComplexScript italicComplexScript3 = new ItalicComplexScript() { Val = false };
            Color color10 = new Color() { Val = "FFFFFF", ThemeColor = ThemeColorValues.Background1 };

            runPropertiesBaseStyle8.Append(bold13);
            runPropertiesBaseStyle8.Append(boldComplexScript13);
            runPropertiesBaseStyle8.Append(italic3);
            runPropertiesBaseStyle8.Append(italicComplexScript3);
            runPropertiesBaseStyle8.Append(color10);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties7 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties7 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders6 = new TableCellBorders();
            LeftBorder leftBorder9 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder9 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)24U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder5 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder5 = new InsideVerticalBorder() { Val = BorderValues.Nil };

            tableCellBorders6.Append(leftBorder9);
            tableCellBorders6.Append(rightBorder9);
            tableCellBorders6.Append(insideHorizontalBorder5);
            tableCellBorders6.Append(insideVerticalBorder5);
            Shading shading5 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "4F81BD", ThemeFill = ThemeColorValues.Accent1 };

            tableStyleConditionalFormattingTableCellProperties7.Append(tableCellBorders6);
            tableStyleConditionalFormattingTableCellProperties7.Append(shading5);

            tableStyleProperties9.Append(runPropertiesBaseStyle8);
            tableStyleProperties9.Append(tableStyleConditionalFormattingTableProperties7);
            tableStyleProperties9.Append(tableStyleConditionalFormattingTableCellProperties7);

            TableStyleProperties tableStyleProperties10 = new TableStyleProperties() { Type = TableStyleOverrideValues.LastColumn };

            RunPropertiesBaseStyle runPropertiesBaseStyle9 = new RunPropertiesBaseStyle();
            Bold bold14 = new Bold();
            BoldComplexScript boldComplexScript14 = new BoldComplexScript();
            Italic italic4 = new Italic() { Val = false };
            ItalicComplexScript italicComplexScript4 = new ItalicComplexScript() { Val = false };
            Color color11 = new Color() { Val = "FFFFFF", ThemeColor = ThemeColorValues.Background1 };

            runPropertiesBaseStyle9.Append(bold14);
            runPropertiesBaseStyle9.Append(boldComplexScript14);
            runPropertiesBaseStyle9.Append(italic4);
            runPropertiesBaseStyle9.Append(italicComplexScript4);
            runPropertiesBaseStyle9.Append(color11);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties8 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties8 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders7 = new TableCellBorders();
            TopBorder topBorder9 = new TopBorder() { Val = BorderValues.Nil };
            LeftBorder leftBorder10 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)24U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder9 = new BottomBorder() { Val = BorderValues.Nil };
            RightBorder rightBorder10 = new RightBorder() { Val = BorderValues.Nil };
            InsideHorizontalBorder insideHorizontalBorder6 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder6 = new InsideVerticalBorder() { Val = BorderValues.Nil };

            tableCellBorders7.Append(topBorder9);
            tableCellBorders7.Append(leftBorder10);
            tableCellBorders7.Append(bottomBorder9);
            tableCellBorders7.Append(rightBorder10);
            tableCellBorders7.Append(insideHorizontalBorder6);
            tableCellBorders7.Append(insideVerticalBorder6);
            Shading shading6 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "4F81BD", ThemeFill = ThemeColorValues.Accent1 };

            tableStyleConditionalFormattingTableCellProperties8.Append(tableCellBorders7);
            tableStyleConditionalFormattingTableCellProperties8.Append(shading6);

            tableStyleProperties10.Append(runPropertiesBaseStyle9);
            tableStyleProperties10.Append(tableStyleConditionalFormattingTableProperties8);
            tableStyleProperties10.Append(tableStyleConditionalFormattingTableCellProperties8);

            TableStyleProperties tableStyleProperties11 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band1Vertical };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties9 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties9 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders8 = new TableCellBorders();
            TopBorder topBorder10 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder11 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder10 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder11 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder7 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder7 = new InsideVerticalBorder() { Val = BorderValues.Nil };

            tableCellBorders8.Append(topBorder10);
            tableCellBorders8.Append(leftBorder11);
            tableCellBorders8.Append(bottomBorder10);
            tableCellBorders8.Append(rightBorder11);
            tableCellBorders8.Append(insideHorizontalBorder7);
            tableCellBorders8.Append(insideVerticalBorder7);
            Shading shading7 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "A7BFDE", ThemeFill = ThemeColorValues.Accent1, ThemeFillTint = "7F" };

            tableStyleConditionalFormattingTableCellProperties9.Append(tableCellBorders8);
            tableStyleConditionalFormattingTableCellProperties9.Append(shading7);

            tableStyleProperties11.Append(tableStyleConditionalFormattingTableProperties9);
            tableStyleProperties11.Append(tableStyleConditionalFormattingTableCellProperties9);

            TableStyleProperties tableStyleProperties12 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band1Horizontal };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties10 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties10 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders9 = new TableCellBorders();
            TopBorder topBorder11 = new TopBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder12 = new LeftBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder11 = new BottomBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder12 = new RightBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder8 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder8 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "FFFFFF", ThemeColor = ThemeColorValues.Background1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders9.Append(topBorder11);
            tableCellBorders9.Append(leftBorder12);
            tableCellBorders9.Append(bottomBorder11);
            tableCellBorders9.Append(rightBorder12);
            tableCellBorders9.Append(insideHorizontalBorder8);
            tableCellBorders9.Append(insideVerticalBorder8);
            Shading shading8 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "A7BFDE", ThemeFill = ThemeColorValues.Accent1, ThemeFillTint = "7F" };

            tableStyleConditionalFormattingTableCellProperties10.Append(tableCellBorders9);
            tableStyleConditionalFormattingTableCellProperties10.Append(shading8);

            tableStyleProperties12.Append(tableStyleConditionalFormattingTableProperties10);
            tableStyleProperties12.Append(tableStyleConditionalFormattingTableCellProperties10);

            style13.Append(styleName13);
            style13.Append(basedOn9);
            style13.Append(uIPriority12);
            style13.Append(rsid10);
            style13.Append(styleParagraphProperties9);
            style13.Append(styleTableProperties4);
            style13.Append(styleTableCellProperties1);
            style13.Append(tableStyleProperties7);
            style13.Append(tableStyleProperties8);
            style13.Append(tableStyleProperties9);
            style13.Append(tableStyleProperties10);
            style13.Append(tableStyleProperties11);
            style13.Append(tableStyleProperties12);

            Style style14 = new Style() { Type = StyleValues.Table, StyleId = "MediumShading1-Accent1" };
            StyleName styleName14 = new StyleName() { Val = "Medium Shading 1 Accent 1" };
            BasedOn basedOn10 = new BasedOn() { Val = "TableNormal" };
            UIPriority uIPriority13 = new UIPriority() { Val = 63 };
            Rsid rsid11 = new Rsid() { Val = "00BA40EF" };

            StyleParagraphProperties styleParagraphProperties10 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines11 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties10.Append(spacingBetweenLines11);

            StyleTableProperties styleTableProperties5 = new StyleTableProperties();
            TableStyleRowBandSize tableStyleRowBandSize3 = new TableStyleRowBandSize() { Val = 1 };
            TableStyleColumnBandSize tableStyleColumnBandSize3 = new TableStyleColumnBandSize() { Val = 1 };
            TableIndentation tableIndentation5 = new TableIndentation() { Width = 0, Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders4 = new TableBorders();
            TopBorder topBorder12 = new TopBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder13 = new LeftBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder12 = new BottomBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder13 = new RightBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder9 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableBorders4.Append(topBorder12);
            tableBorders4.Append(leftBorder13);
            tableBorders4.Append(bottomBorder12);
            tableBorders4.Append(rightBorder13);
            tableBorders4.Append(insideHorizontalBorder9);

            TableCellMarginDefault tableCellMarginDefault5 = new TableCellMarginDefault();
            TopMargin topMargin5 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellLeftMargin tableCellLeftMargin5 = new TableCellLeftMargin() { Width = 108, Type = TableWidthValues.Dxa };
            BottomMargin bottomMargin5 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellRightMargin tableCellRightMargin5 = new TableCellRightMargin() { Width = 108, Type = TableWidthValues.Dxa };

            tableCellMarginDefault5.Append(topMargin5);
            tableCellMarginDefault5.Append(tableCellLeftMargin5);
            tableCellMarginDefault5.Append(bottomMargin5);
            tableCellMarginDefault5.Append(tableCellRightMargin5);

            styleTableProperties5.Append(tableStyleRowBandSize3);
            styleTableProperties5.Append(tableStyleColumnBandSize3);
            styleTableProperties5.Append(tableIndentation5);
            styleTableProperties5.Append(tableBorders4);
            styleTableProperties5.Append(tableCellMarginDefault5);

            TableStyleProperties tableStyleProperties13 = new TableStyleProperties() { Type = TableStyleOverrideValues.FirstRow };

            StyleParagraphProperties styleParagraphProperties11 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines12 = new SpacingBetweenLines() { Before = "0", After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties11.Append(spacingBetweenLines12);

            RunPropertiesBaseStyle runPropertiesBaseStyle10 = new RunPropertiesBaseStyle();
            Bold bold15 = new Bold();
            BoldComplexScript boldComplexScript15 = new BoldComplexScript();
            Color color12 = new Color() { Val = "FFFFFF", ThemeColor = ThemeColorValues.Background1 };

            runPropertiesBaseStyle10.Append(bold15);
            runPropertiesBaseStyle10.Append(boldComplexScript15);
            runPropertiesBaseStyle10.Append(color12);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties11 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties11 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders10 = new TableCellBorders();
            TopBorder topBorder13 = new TopBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder14 = new LeftBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder13 = new BottomBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder14 = new RightBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder10 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder9 = new InsideVerticalBorder() { Val = BorderValues.Nil };

            tableCellBorders10.Append(topBorder13);
            tableCellBorders10.Append(leftBorder14);
            tableCellBorders10.Append(bottomBorder13);
            tableCellBorders10.Append(rightBorder14);
            tableCellBorders10.Append(insideHorizontalBorder10);
            tableCellBorders10.Append(insideVerticalBorder9);
            Shading shading9 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "4F81BD", ThemeFill = ThemeColorValues.Accent1 };

            tableStyleConditionalFormattingTableCellProperties11.Append(tableCellBorders10);
            tableStyleConditionalFormattingTableCellProperties11.Append(shading9);

            tableStyleProperties13.Append(styleParagraphProperties11);
            tableStyleProperties13.Append(runPropertiesBaseStyle10);
            tableStyleProperties13.Append(tableStyleConditionalFormattingTableProperties11);
            tableStyleProperties13.Append(tableStyleConditionalFormattingTableCellProperties11);

            TableStyleProperties tableStyleProperties14 = new TableStyleProperties() { Type = TableStyleOverrideValues.LastRow };

            StyleParagraphProperties styleParagraphProperties12 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines13 = new SpacingBetweenLines() { Before = "0", After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties12.Append(spacingBetweenLines13);

            RunPropertiesBaseStyle runPropertiesBaseStyle11 = new RunPropertiesBaseStyle();
            Bold bold16 = new Bold();
            BoldComplexScript boldComplexScript16 = new BoldComplexScript();

            runPropertiesBaseStyle11.Append(bold16);
            runPropertiesBaseStyle11.Append(boldComplexScript16);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties12 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties12 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders11 = new TableCellBorders();
            TopBorder topBorder14 = new TopBorder() { Val = BorderValues.Double, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)6U, Space = (UInt32Value)0U };
            LeftBorder leftBorder15 = new LeftBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder14 = new BottomBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder15 = new RightBorder() { Val = BorderValues.Single, Color = "7BA0CD", ThemeColor = ThemeColorValues.Accent1, ThemeTint = "BF", Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder11 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder10 = new InsideVerticalBorder() { Val = BorderValues.Nil };

            tableCellBorders11.Append(topBorder14);
            tableCellBorders11.Append(leftBorder15);
            tableCellBorders11.Append(bottomBorder14);
            tableCellBorders11.Append(rightBorder15);
            tableCellBorders11.Append(insideHorizontalBorder11);
            tableCellBorders11.Append(insideVerticalBorder10);

            tableStyleConditionalFormattingTableCellProperties12.Append(tableCellBorders11);

            tableStyleProperties14.Append(styleParagraphProperties12);
            tableStyleProperties14.Append(runPropertiesBaseStyle11);
            tableStyleProperties14.Append(tableStyleConditionalFormattingTableProperties12);
            tableStyleProperties14.Append(tableStyleConditionalFormattingTableCellProperties12);

            TableStyleProperties tableStyleProperties15 = new TableStyleProperties() { Type = TableStyleOverrideValues.FirstColumn };

            RunPropertiesBaseStyle runPropertiesBaseStyle12 = new RunPropertiesBaseStyle();
            Bold bold17 = new Bold();
            BoldComplexScript boldComplexScript17 = new BoldComplexScript();

            runPropertiesBaseStyle12.Append(bold17);
            runPropertiesBaseStyle12.Append(boldComplexScript17);

            tableStyleProperties15.Append(runPropertiesBaseStyle12);

            TableStyleProperties tableStyleProperties16 = new TableStyleProperties() { Type = TableStyleOverrideValues.LastColumn };

            RunPropertiesBaseStyle runPropertiesBaseStyle13 = new RunPropertiesBaseStyle();
            Bold bold18 = new Bold();
            BoldComplexScript boldComplexScript18 = new BoldComplexScript();

            runPropertiesBaseStyle13.Append(bold18);
            runPropertiesBaseStyle13.Append(boldComplexScript18);

            tableStyleProperties16.Append(runPropertiesBaseStyle13);

            TableStyleProperties tableStyleProperties17 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band1Vertical };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties13 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties13 = new TableStyleConditionalFormattingTableCellProperties();
            Shading shading10 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D3DFEE", ThemeFill = ThemeColorValues.Accent1, ThemeFillTint = "3F" };

            tableStyleConditionalFormattingTableCellProperties13.Append(shading10);

            tableStyleProperties17.Append(tableStyleConditionalFormattingTableProperties13);
            tableStyleProperties17.Append(tableStyleConditionalFormattingTableCellProperties13);

            TableStyleProperties tableStyleProperties18 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band1Horizontal };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties14 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties14 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders12 = new TableCellBorders();
            InsideHorizontalBorder insideHorizontalBorder12 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder11 = new InsideVerticalBorder() { Val = BorderValues.Nil };

            tableCellBorders12.Append(insideHorizontalBorder12);
            tableCellBorders12.Append(insideVerticalBorder11);
            Shading shading11 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D3DFEE", ThemeFill = ThemeColorValues.Accent1, ThemeFillTint = "3F" };

            tableStyleConditionalFormattingTableCellProperties14.Append(tableCellBorders12);
            tableStyleConditionalFormattingTableCellProperties14.Append(shading11);

            tableStyleProperties18.Append(tableStyleConditionalFormattingTableProperties14);
            tableStyleProperties18.Append(tableStyleConditionalFormattingTableCellProperties14);

            TableStyleProperties tableStyleProperties19 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band2Horizontal };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties15 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties15 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders13 = new TableCellBorders();
            InsideHorizontalBorder insideHorizontalBorder13 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder12 = new InsideVerticalBorder() { Val = BorderValues.Nil };

            tableCellBorders13.Append(insideHorizontalBorder13);
            tableCellBorders13.Append(insideVerticalBorder12);

            tableStyleConditionalFormattingTableCellProperties15.Append(tableCellBorders13);

            tableStyleProperties19.Append(tableStyleConditionalFormattingTableProperties15);
            tableStyleProperties19.Append(tableStyleConditionalFormattingTableCellProperties15);

            style14.Append(styleName14);
            style14.Append(basedOn10);
            style14.Append(uIPriority13);
            style14.Append(rsid11);
            style14.Append(styleParagraphProperties10);
            style14.Append(styleTableProperties5);
            style14.Append(tableStyleProperties13);
            style14.Append(tableStyleProperties14);
            style14.Append(tableStyleProperties15);
            style14.Append(tableStyleProperties16);
            style14.Append(tableStyleProperties17);
            style14.Append(tableStyleProperties18);
            style14.Append(tableStyleProperties19);

            Style style15 = new Style() { Type = StyleValues.Table, StyleId = "LightGrid-Accent1" };
            StyleName styleName15 = new StyleName() { Val = "Light Grid Accent 1" };
            BasedOn basedOn11 = new BasedOn() { Val = "TableNormal" };
            UIPriority uIPriority14 = new UIPriority() { Val = 62 };
            Rsid rsid12 = new Rsid() { Val = "00BA40EF" };

            StyleParagraphProperties styleParagraphProperties13 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines14 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties13.Append(spacingBetweenLines14);

            StyleTableProperties styleTableProperties6 = new StyleTableProperties();
            TableStyleRowBandSize tableStyleRowBandSize4 = new TableStyleRowBandSize() { Val = 1 };
            TableStyleColumnBandSize tableStyleColumnBandSize4 = new TableStyleColumnBandSize() { Val = 1 };
            TableIndentation tableIndentation6 = new TableIndentation() { Width = 0, Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders5 = new TableBorders();
            TopBorder topBorder15 = new TopBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder16 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder15 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder16 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder14 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder13 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableBorders5.Append(topBorder15);
            tableBorders5.Append(leftBorder16);
            tableBorders5.Append(bottomBorder15);
            tableBorders5.Append(rightBorder16);
            tableBorders5.Append(insideHorizontalBorder14);
            tableBorders5.Append(insideVerticalBorder13);

            TableCellMarginDefault tableCellMarginDefault6 = new TableCellMarginDefault();
            TopMargin topMargin6 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellLeftMargin tableCellLeftMargin6 = new TableCellLeftMargin() { Width = 108, Type = TableWidthValues.Dxa };
            BottomMargin bottomMargin6 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            TableCellRightMargin tableCellRightMargin6 = new TableCellRightMargin() { Width = 108, Type = TableWidthValues.Dxa };

            tableCellMarginDefault6.Append(topMargin6);
            tableCellMarginDefault6.Append(tableCellLeftMargin6);
            tableCellMarginDefault6.Append(bottomMargin6);
            tableCellMarginDefault6.Append(tableCellRightMargin6);

            styleTableProperties6.Append(tableStyleRowBandSize4);
            styleTableProperties6.Append(tableStyleColumnBandSize4);
            styleTableProperties6.Append(tableIndentation6);
            styleTableProperties6.Append(tableBorders5);
            styleTableProperties6.Append(tableCellMarginDefault6);

            TableStyleProperties tableStyleProperties20 = new TableStyleProperties() { Type = TableStyleOverrideValues.FirstRow };

            StyleParagraphProperties styleParagraphProperties14 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines15 = new SpacingBetweenLines() { Before = "0", After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties14.Append(spacingBetweenLines15);

            RunPropertiesBaseStyle runPropertiesBaseStyle14 = new RunPropertiesBaseStyle();
            RunFonts runFonts8 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold19 = new Bold();
            BoldComplexScript boldComplexScript19 = new BoldComplexScript();

            runPropertiesBaseStyle14.Append(runFonts8);
            runPropertiesBaseStyle14.Append(bold19);
            runPropertiesBaseStyle14.Append(boldComplexScript19);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties16 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties16 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders14 = new TableCellBorders();
            TopBorder topBorder16 = new TopBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder17 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder16 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)18U, Space = (UInt32Value)0U };
            RightBorder rightBorder17 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder15 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder14 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders14.Append(topBorder16);
            tableCellBorders14.Append(leftBorder17);
            tableCellBorders14.Append(bottomBorder16);
            tableCellBorders14.Append(rightBorder17);
            tableCellBorders14.Append(insideHorizontalBorder15);
            tableCellBorders14.Append(insideVerticalBorder14);

            tableStyleConditionalFormattingTableCellProperties16.Append(tableCellBorders14);

            tableStyleProperties20.Append(styleParagraphProperties14);
            tableStyleProperties20.Append(runPropertiesBaseStyle14);
            tableStyleProperties20.Append(tableStyleConditionalFormattingTableProperties16);
            tableStyleProperties20.Append(tableStyleConditionalFormattingTableCellProperties16);

            TableStyleProperties tableStyleProperties21 = new TableStyleProperties() { Type = TableStyleOverrideValues.LastRow };

            StyleParagraphProperties styleParagraphProperties15 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines16 = new SpacingBetweenLines() { Before = "0", After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties15.Append(spacingBetweenLines16);

            RunPropertiesBaseStyle runPropertiesBaseStyle15 = new RunPropertiesBaseStyle();
            RunFonts runFonts9 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold20 = new Bold();
            BoldComplexScript boldComplexScript20 = new BoldComplexScript();

            runPropertiesBaseStyle15.Append(runFonts9);
            runPropertiesBaseStyle15.Append(bold20);
            runPropertiesBaseStyle15.Append(boldComplexScript20);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties17 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties17 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders15 = new TableCellBorders();
            TopBorder topBorder17 = new TopBorder() { Val = BorderValues.Double, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)6U, Space = (UInt32Value)0U };
            LeftBorder leftBorder18 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder17 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder18 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder16 = new InsideHorizontalBorder() { Val = BorderValues.Nil };
            InsideVerticalBorder insideVerticalBorder15 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders15.Append(topBorder17);
            tableCellBorders15.Append(leftBorder18);
            tableCellBorders15.Append(bottomBorder17);
            tableCellBorders15.Append(rightBorder18);
            tableCellBorders15.Append(insideHorizontalBorder16);
            tableCellBorders15.Append(insideVerticalBorder15);

            tableStyleConditionalFormattingTableCellProperties17.Append(tableCellBorders15);

            tableStyleProperties21.Append(styleParagraphProperties15);
            tableStyleProperties21.Append(runPropertiesBaseStyle15);
            tableStyleProperties21.Append(tableStyleConditionalFormattingTableProperties17);
            tableStyleProperties21.Append(tableStyleConditionalFormattingTableCellProperties17);

            TableStyleProperties tableStyleProperties22 = new TableStyleProperties() { Type = TableStyleOverrideValues.FirstColumn };

            RunPropertiesBaseStyle runPropertiesBaseStyle16 = new RunPropertiesBaseStyle();
            RunFonts runFonts10 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold21 = new Bold();
            BoldComplexScript boldComplexScript21 = new BoldComplexScript();

            runPropertiesBaseStyle16.Append(runFonts10);
            runPropertiesBaseStyle16.Append(bold21);
            runPropertiesBaseStyle16.Append(boldComplexScript21);

            tableStyleProperties22.Append(runPropertiesBaseStyle16);

            TableStyleProperties tableStyleProperties23 = new TableStyleProperties() { Type = TableStyleOverrideValues.LastColumn };

            RunPropertiesBaseStyle runPropertiesBaseStyle17 = new RunPropertiesBaseStyle();
            RunFonts runFonts11 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Bold bold22 = new Bold();
            BoldComplexScript boldComplexScript22 = new BoldComplexScript();

            runPropertiesBaseStyle17.Append(runFonts11);
            runPropertiesBaseStyle17.Append(bold22);
            runPropertiesBaseStyle17.Append(boldComplexScript22);
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties18 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties18 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders16 = new TableCellBorders();
            TopBorder topBorder18 = new TopBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder19 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder18 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder19 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders16.Append(topBorder18);
            tableCellBorders16.Append(leftBorder19);
            tableCellBorders16.Append(bottomBorder18);
            tableCellBorders16.Append(rightBorder19);

            tableStyleConditionalFormattingTableCellProperties18.Append(tableCellBorders16);

            tableStyleProperties23.Append(runPropertiesBaseStyle17);
            tableStyleProperties23.Append(tableStyleConditionalFormattingTableProperties18);
            tableStyleProperties23.Append(tableStyleConditionalFormattingTableCellProperties18);

            TableStyleProperties tableStyleProperties24 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band1Vertical };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties19 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties19 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders17 = new TableCellBorders();
            TopBorder topBorder19 = new TopBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder20 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder19 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder20 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders17.Append(topBorder19);
            tableCellBorders17.Append(leftBorder20);
            tableCellBorders17.Append(bottomBorder19);
            tableCellBorders17.Append(rightBorder20);
            Shading shading12 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D3DFEE", ThemeFill = ThemeColorValues.Accent1, ThemeFillTint = "3F" };

            tableStyleConditionalFormattingTableCellProperties19.Append(tableCellBorders17);
            tableStyleConditionalFormattingTableCellProperties19.Append(shading12);

            tableStyleProperties24.Append(tableStyleConditionalFormattingTableProperties19);
            tableStyleProperties24.Append(tableStyleConditionalFormattingTableCellProperties19);

            TableStyleProperties tableStyleProperties25 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band1Horizontal };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties20 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties20 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders18 = new TableCellBorders();
            TopBorder topBorder20 = new TopBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder21 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder20 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder21 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder16 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders18.Append(topBorder20);
            tableCellBorders18.Append(leftBorder21);
            tableCellBorders18.Append(bottomBorder20);
            tableCellBorders18.Append(rightBorder21);
            tableCellBorders18.Append(insideVerticalBorder16);
            Shading shading13 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D3DFEE", ThemeFill = ThemeColorValues.Accent1, ThemeFillTint = "3F" };

            tableStyleConditionalFormattingTableCellProperties20.Append(tableCellBorders18);
            tableStyleConditionalFormattingTableCellProperties20.Append(shading13);

            tableStyleProperties25.Append(tableStyleConditionalFormattingTableProperties20);
            tableStyleProperties25.Append(tableStyleConditionalFormattingTableCellProperties20);

            TableStyleProperties tableStyleProperties26 = new TableStyleProperties() { Type = TableStyleOverrideValues.Band2Horizontal };
            TableStyleConditionalFormattingTableProperties tableStyleConditionalFormattingTableProperties21 = new TableStyleConditionalFormattingTableProperties();

            TableStyleConditionalFormattingTableCellProperties tableStyleConditionalFormattingTableCellProperties21 = new TableStyleConditionalFormattingTableCellProperties();

            TableCellBorders tableCellBorders19 = new TableCellBorders();
            TopBorder topBorder21 = new TopBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            LeftBorder leftBorder22 = new LeftBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder21 = new BottomBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            RightBorder rightBorder22 = new RightBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder17 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "4F81BD", ThemeColor = ThemeColorValues.Accent1, Size = (UInt32Value)8U, Space = (UInt32Value)0U };

            tableCellBorders19.Append(topBorder21);
            tableCellBorders19.Append(leftBorder22);
            tableCellBorders19.Append(bottomBorder21);
            tableCellBorders19.Append(rightBorder22);
            tableCellBorders19.Append(insideVerticalBorder17);

            tableStyleConditionalFormattingTableCellProperties21.Append(tableCellBorders19);

            tableStyleProperties26.Append(tableStyleConditionalFormattingTableProperties21);
            tableStyleProperties26.Append(tableStyleConditionalFormattingTableCellProperties21);

            style15.Append(styleName15);
            style15.Append(basedOn11);
            style15.Append(uIPriority14);
            style15.Append(rsid12);
            style15.Append(styleParagraphProperties13);
            style15.Append(styleTableProperties6);
            style15.Append(tableStyleProperties20);
            style15.Append(tableStyleProperties21);
            style15.Append(tableStyleProperties22);
            style15.Append(tableStyleProperties23);
            style15.Append(tableStyleProperties24);
            style15.Append(tableStyleProperties25);
            style15.Append(tableStyleProperties26);

            Style style16 = new Style() { Type = StyleValues.Paragraph, StyleId = "Quote" };
            StyleName styleName16 = new StyleName() { Val = "Quote" };
            BasedOn basedOn12 = new BasedOn() { Val = "Normal" };
            NextParagraphStyle nextParagraphStyle4 = new NextParagraphStyle() { Val = "Normal" };
            LinkedStyle linkedStyle7 = new LinkedStyle() { Val = "QuoteChar" };
            UIPriority uIPriority15 = new UIPriority() { Val = 29 };
            PrimaryStyle primaryStyle6 = new PrimaryStyle();
            Rsid rsid13 = new Rsid() { Val = "00851582" };

            StyleParagraphProperties styleParagraphProperties16 = new StyleParagraphProperties();

            ParagraphBorders paragraphBorders1 = new ParagraphBorders();
            TopBorder topBorder22 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)1U };
            LeftBorder leftBorder23 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)4U };
            BottomBorder bottomBorder22 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)1U };
            RightBorder rightBorder23 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)4U };

            paragraphBorders1.Append(topBorder22);
            paragraphBorders1.Append(leftBorder23);
            paragraphBorders1.Append(bottomBorder22);
            paragraphBorders1.Append(rightBorder23);

            styleParagraphProperties16.Append(paragraphBorders1);

            StyleRunProperties styleRunProperties7 = new StyleRunProperties();
            Italic italic5 = new Italic();
            ItalicComplexScript italicComplexScript5 = new ItalicComplexScript();
            Color color13 = new Color() { Val = "000000", ThemeColor = ThemeColorValues.Text1 };

            styleRunProperties7.Append(italic5);
            styleRunProperties7.Append(italicComplexScript5);
            styleRunProperties7.Append(color13);

            style16.Append(styleName16);
            style16.Append(basedOn12);
            style16.Append(nextParagraphStyle4);
            style16.Append(linkedStyle7);
            style16.Append(uIPriority15);
            style16.Append(primaryStyle6);
            style16.Append(rsid13);
            style16.Append(styleParagraphProperties16);
            style16.Append(styleRunProperties7);

            Style style17 = new Style() { Type = StyleValues.Character, StyleId = "QuoteChar", CustomStyle = true };
            StyleName styleName17 = new StyleName() { Val = "Quote Char" };
            BasedOn basedOn13 = new BasedOn() { Val = "DefaultParagraphFont" };
            LinkedStyle linkedStyle8 = new LinkedStyle() { Val = "Quote" };
            UIPriority uIPriority16 = new UIPriority() { Val = 29 };
            Rsid rsid14 = new Rsid() { Val = "00851582" };

            StyleRunProperties styleRunProperties8 = new StyleRunProperties();
            Italic italic6 = new Italic();
            ItalicComplexScript italicComplexScript6 = new ItalicComplexScript();
            Color color14 = new Color() { Val = "000000", ThemeColor = ThemeColorValues.Text1 };

            styleRunProperties8.Append(italic6);
            styleRunProperties8.Append(italicComplexScript6);
            styleRunProperties8.Append(color14);

            style17.Append(styleName17);
            style17.Append(basedOn13);
            style17.Append(linkedStyle8);
            style17.Append(uIPriority16);
            style17.Append(rsid14);
            style17.Append(styleRunProperties8);

            Style style18 = new Style() { Type = StyleValues.Paragraph, StyleId = "TOCHeading" };
            StyleName styleName18 = new StyleName() { Val = "TOC Heading" };
            BasedOn basedOn14 = new BasedOn() { Val = "Heading1" };
            NextParagraphStyle nextParagraphStyle5 = new NextParagraphStyle() { Val = "Normal" };
            UIPriority uIPriority17 = new UIPriority() { Val = 39 };
            SemiHidden semiHidden4 = new SemiHidden();
            UnhideWhenUsed unhideWhenUsed6 = new UnhideWhenUsed();
            PrimaryStyle primaryStyle7 = new PrimaryStyle();
            Rsid rsid15 = new Rsid() { Val = "00A636FD" };

            StyleParagraphProperties styleParagraphProperties17 = new StyleParagraphProperties();
            OutlineLevel outlineLevel4 = new OutlineLevel() { Val = 9 };

            styleParagraphProperties17.Append(outlineLevel4);

            style18.Append(styleName18);
            style18.Append(basedOn14);
            style18.Append(nextParagraphStyle5);
            style18.Append(uIPriority17);
            style18.Append(semiHidden4);
            style18.Append(unhideWhenUsed6);
            style18.Append(primaryStyle7);
            style18.Append(rsid15);
            style18.Append(styleParagraphProperties17);

            Style style19 = new Style() { Type = StyleValues.Paragraph, StyleId = "TOC1" };
            StyleName styleName19 = new StyleName() { Val = "toc 1" };
            BasedOn basedOn15 = new BasedOn() { Val = "Normal" };
            NextParagraphStyle nextParagraphStyle6 = new NextParagraphStyle() { Val = "Normal" };
            AutoRedefine autoRedefine1 = new AutoRedefine();
            UIPriority uIPriority18 = new UIPriority() { Val = 39 };
            UnhideWhenUsed unhideWhenUsed7 = new UnhideWhenUsed();
            Rsid rsid16 = new Rsid() { Val = "00A636FD" };

            StyleParagraphProperties styleParagraphProperties18 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines17 = new SpacingBetweenLines() { After = "100" };

            styleParagraphProperties18.Append(spacingBetweenLines17);

            style19.Append(styleName19);
            style19.Append(basedOn15);
            style19.Append(nextParagraphStyle6);
            style19.Append(autoRedefine1);
            style19.Append(uIPriority18);
            style19.Append(unhideWhenUsed7);
            style19.Append(rsid16);
            style19.Append(styleParagraphProperties18);

            Style style20 = new Style() { Type = StyleValues.Paragraph, StyleId = "TOC2" };
            StyleName styleName20 = new StyleName() { Val = "toc 2" };
            BasedOn basedOn16 = new BasedOn() { Val = "Normal" };
            NextParagraphStyle nextParagraphStyle7 = new NextParagraphStyle() { Val = "Normal" };
            AutoRedefine autoRedefine2 = new AutoRedefine();
            UIPriority uIPriority19 = new UIPriority() { Val = 39 };
            UnhideWhenUsed unhideWhenUsed8 = new UnhideWhenUsed();
            Rsid rsid17 = new Rsid() { Val = "00A636FD" };

            StyleParagraphProperties styleParagraphProperties19 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines18 = new SpacingBetweenLines() { After = "100" };
            Indentation indentation1 = new Indentation() { Left = "220" };

            styleParagraphProperties19.Append(spacingBetweenLines18);
            styleParagraphProperties19.Append(indentation1);

            style20.Append(styleName20);
            style20.Append(basedOn16);
            style20.Append(nextParagraphStyle7);
            style20.Append(autoRedefine2);
            style20.Append(uIPriority19);
            style20.Append(unhideWhenUsed8);
            style20.Append(rsid17);
            style20.Append(styleParagraphProperties19);

            Style style21 = new Style() { Type = StyleValues.Paragraph, StyleId = "TOC3" };
            StyleName styleName21 = new StyleName() { Val = "toc 3" };
            BasedOn basedOn17 = new BasedOn() { Val = "Normal" };
            NextParagraphStyle nextParagraphStyle8 = new NextParagraphStyle() { Val = "Normal" };
            AutoRedefine autoRedefine3 = new AutoRedefine();
            UIPriority uIPriority20 = new UIPriority() { Val = 39 };
            UnhideWhenUsed unhideWhenUsed9 = new UnhideWhenUsed();
            Rsid rsid18 = new Rsid() { Val = "00A636FD" };

            StyleParagraphProperties styleParagraphProperties20 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines19 = new SpacingBetweenLines() { After = "100" };
            Indentation indentation2 = new Indentation() { Left = "440" };

            styleParagraphProperties20.Append(spacingBetweenLines19);
            styleParagraphProperties20.Append(indentation2);

            style21.Append(styleName21);
            style21.Append(basedOn17);
            style21.Append(nextParagraphStyle8);
            style21.Append(autoRedefine3);
            style21.Append(uIPriority20);
            style21.Append(unhideWhenUsed9);
            style21.Append(rsid18);
            style21.Append(styleParagraphProperties20);

            Style style22 = new Style() { Type = StyleValues.Character, StyleId = "Hyperlink" };
            StyleName styleName22 = new StyleName() { Val = "Hyperlink" };
            BasedOn basedOn18 = new BasedOn() { Val = "DefaultParagraphFont" };
            UIPriority uIPriority21 = new UIPriority() { Val = 99 };
            UnhideWhenUsed unhideWhenUsed10 = new UnhideWhenUsed();
            Rsid rsid19 = new Rsid() { Val = "00A636FD" };

            StyleRunProperties styleRunProperties9 = new StyleRunProperties();
            Color color15 = new Color() { Val = "0000FF", ThemeColor = ThemeColorValues.Hyperlink };
            Underline underline1 = new Underline() { Val = UnderlineValues.Single };

            styleRunProperties9.Append(color15);
            styleRunProperties9.Append(underline1);

            style22.Append(styleName22);
            style22.Append(basedOn18);
            style22.Append(uIPriority21);
            style22.Append(unhideWhenUsed10);
            style22.Append(rsid19);
            style22.Append(styleRunProperties9);

            Style style23 = new Style() { Type = StyleValues.Paragraph, StyleId = "BalloonText" };
            StyleName styleName23 = new StyleName() { Val = "Balloon Text" };
            BasedOn basedOn19 = new BasedOn() { Val = "Normal" };
            LinkedStyle linkedStyle9 = new LinkedStyle() { Val = "BalloonTextChar" };
            UIPriority uIPriority22 = new UIPriority() { Val = 99 };
            SemiHidden semiHidden5 = new SemiHidden();
            UnhideWhenUsed unhideWhenUsed11 = new UnhideWhenUsed();
            Rsid rsid20 = new Rsid() { Val = "00A636FD" };

            StyleParagraphProperties styleParagraphProperties21 = new StyleParagraphProperties();
            SpacingBetweenLines spacingBetweenLines20 = new SpacingBetweenLines() { Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties21.Append(spacingBetweenLines20);

            StyleRunProperties styleRunProperties10 = new StyleRunProperties();
            RunFonts runFonts12 = new RunFonts() { Ascii = "Tahoma", HighAnsi = "Tahoma", ComplexScript = "Tahoma" };
            FontSize fontSize6 = new FontSize() { Val = "16" };
            FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "16" };

            styleRunProperties10.Append(runFonts12);
            styleRunProperties10.Append(fontSize6);
            styleRunProperties10.Append(fontSizeComplexScript6);

            style23.Append(styleName23);
            style23.Append(basedOn19);
            style23.Append(linkedStyle9);
            style23.Append(uIPriority22);
            style23.Append(semiHidden5);
            style23.Append(unhideWhenUsed11);
            style23.Append(rsid20);
            style23.Append(styleParagraphProperties21);
            style23.Append(styleRunProperties10);

            Style style24 = new Style() { Type = StyleValues.Character, StyleId = "BalloonTextChar", CustomStyle = true };
            StyleName styleName24 = new StyleName() { Val = "Balloon Text Char" };
            BasedOn basedOn20 = new BasedOn() { Val = "DefaultParagraphFont" };
            LinkedStyle linkedStyle10 = new LinkedStyle() { Val = "BalloonText" };
            UIPriority uIPriority23 = new UIPriority() { Val = 99 };
            SemiHidden semiHidden6 = new SemiHidden();
            Rsid rsid21 = new Rsid() { Val = "00A636FD" };

            StyleRunProperties styleRunProperties11 = new StyleRunProperties();
            RunFonts runFonts13 = new RunFonts() { Ascii = "Tahoma", HighAnsi = "Tahoma", ComplexScript = "Tahoma" };
            FontSize fontSize7 = new FontSize() { Val = "16" };
            FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "16" };

            styleRunProperties11.Append(runFonts13);
            styleRunProperties11.Append(fontSize7);
            styleRunProperties11.Append(fontSizeComplexScript7);

            style24.Append(styleName24);
            style24.Append(basedOn20);
            style24.Append(linkedStyle10);
            style24.Append(uIPriority23);
            style24.Append(semiHidden6);
            style24.Append(rsid21);
            style24.Append(styleRunProperties11);

            Style style25 = new Style() { Type = StyleValues.Paragraph, StyleId = "Passed", CustomStyle = true };
            StyleName styleName25 = new StyleName() { Val = "Passed" };
            BasedOn basedOn21 = new BasedOn() { Val = "Normal" };
            LinkedStyle linkedStyle11 = new LinkedStyle() { Val = "PassedChar" };
            PrimaryStyle primaryStyle8 = new PrimaryStyle();
            Rsid rsid22 = new Rsid() { Val = "005217FA" };

            StyleParagraphProperties styleParagraphProperties22 = new StyleParagraphProperties();
            Shading shading14 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "00B050" };
            Justification justification1 = new Justification() { Val = JustificationValues.Center };

            styleParagraphProperties22.Append(shading14);
            styleParagraphProperties22.Append(justification1);

            style25.Append(styleName25);
            style25.Append(basedOn21);
            style25.Append(linkedStyle11);
            style25.Append(primaryStyle8);
            style25.Append(rsid22);
            style25.Append(styleParagraphProperties22);

            Style style26 = new Style() { Type = StyleValues.Paragraph, StyleId = "Failed", CustomStyle = true };
            StyleName styleName26 = new StyleName() { Val = "Failed" };
            BasedOn basedOn22 = new BasedOn() { Val = "Passed" };
            LinkedStyle linkedStyle12 = new LinkedStyle() { Val = "FailedChar" };
            PrimaryStyle primaryStyle9 = new PrimaryStyle();
            Rsid rsid23 = new Rsid() { Val = "005217FA" };

            StyleParagraphProperties styleParagraphProperties23 = new StyleParagraphProperties();
            Shading shading15 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "FF0000" };

            styleParagraphProperties23.Append(shading15);

            style26.Append(styleName26);
            style26.Append(basedOn22);
            style26.Append(linkedStyle12);
            style26.Append(primaryStyle9);
            style26.Append(rsid23);
            style26.Append(styleParagraphProperties23);

            Style style27 = new Style() { Type = StyleValues.Character, StyleId = "PassedChar", CustomStyle = true };
            StyleName styleName27 = new StyleName() { Val = "Passed Char" };
            BasedOn basedOn23 = new BasedOn() { Val = "DefaultParagraphFont" };
            LinkedStyle linkedStyle13 = new LinkedStyle() { Val = "Passed" };
            Rsid rsid24 = new Rsid() { Val = "005217FA" };

            StyleRunProperties styleRunProperties12 = new StyleRunProperties();
            Shading shading16 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "00B050" };

            styleRunProperties12.Append(shading16);

            style27.Append(styleName27);
            style27.Append(basedOn23);
            style27.Append(linkedStyle13);
            style27.Append(rsid24);
            style27.Append(styleRunProperties12);

            Style style28 = new Style() { Type = StyleValues.Character, StyleId = "FailedChar", CustomStyle = true };
            StyleName styleName28 = new StyleName() { Val = "Failed Char" };
            BasedOn basedOn24 = new BasedOn() { Val = "PassedChar" };
            LinkedStyle linkedStyle14 = new LinkedStyle() { Val = "Failed" };
            Rsid rsid25 = new Rsid() { Val = "005217FA" };

            StyleRunProperties styleRunProperties13 = new StyleRunProperties();
            Shading shading17 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "FF0000" };

            styleRunProperties13.Append(shading17);

            style28.Append(styleName28);
            style28.Append(basedOn24);
            style28.Append(linkedStyle14);
            style28.Append(rsid25);
            style28.Append(styleRunProperties13);

            styles1.Append(docDefaults1);
            styles1.Append(latentStyles1);
            styles1.Append(style1);
            styles1.Append(style2);
            styles1.Append(style3);
            styles1.Append(style4);
            styles1.Append(style5);
            styles1.Append(style6);
            styles1.Append(style7);
            styles1.Append(style8);
            styles1.Append(style9);
            styles1.Append(style10);
            styles1.Append(style11);
            styles1.Append(style12);
            styles1.Append(style13);
            styles1.Append(style14);
            styles1.Append(style15);
            styles1.Append(style16);
            styles1.Append(style17);
            styles1.Append(style18);
            styles1.Append(style19);
            styles1.Append(style20);
            styles1.Append(style21);
            styles1.Append(style22);
            styles1.Append(style23);
            styles1.Append(style24);
            styles1.Append(style25);
            styles1.Append(style26);
            styles1.Append(style27);
            styles1.Append(style28);

            styles1.Append(GenerateHeaderStyle());
            styles1.Append(GenerateHeaderCharStyle());
            styles1.Append(GenerateFooterStyle());
            styles1.Append(GenerateFooterCharStyle());

            part.Styles = styles1;
        }
コード例 #41
0
ファイル: SLBorder.cs プロジェクト: mousetwentytwo/test
        internal void FromHash(string Hash)
        {
            // Just use the left border. Make sure it's consistent with the ToHash() function.
            LeftBorder lb = new LeftBorder();

            string[] saElementAttribute = Hash.Split(new string[] { SLConstants.XmlBorderPropertiesElementAttributeSeparator }, StringSplitOptions.None);

            if (saElementAttribute.Length >= 2)
            {
                lb.InnerXml = saElementAttribute[0];
                string[] sa = saElementAttribute[1].Split(new string[] { SLConstants.XmlBorderPropertiesAttributeSeparator }, StringSplitOptions.None);
                if (sa.Length >= 1)
                {
                    if (!sa[0].Equals("null")) lb.Style = (BorderStyleValues)Enum.Parse(typeof(BorderStyleValues), sa[0]);
                }
            }

            this.FromBorderPropertiesType(lb);
        }
コード例 #42
0
        private TableCellBorders generateTableCellBordersPlain()
        {
            TableCellBorders tableCellBorders1 = new TableCellBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Nil };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Nil };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Nil };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Nil };

            tableCellBorders1.Append(topBorder1);
            tableCellBorders1.Append(leftBorder1);
            tableCellBorders1.Append(bottomBorder1);
            tableCellBorders1.Append(rightBorder1);

            return tableCellBorders1;
        }
コード例 #43
0
        // Generates content of workbookStyles.
        private void GenerateWorkbookStylesContent(WorkbookStylesPart workbookStyles)
        {
            Stylesheet stylesheet1 = new Stylesheet()
            {
                MCAttributes = new MarkupCompatibilityAttributes()
                {
                    Ignorable = "x14ac"
                }
            };

            stylesheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            stylesheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");

            NumberingFormats numberingFormats1 = new NumberingFormats()
            {
                Count = (UInt32Value)1U
            };
            NumberingFormat numberingFormat1 = new NumberingFormat()
            {
                NumberFormatId = (UInt32Value)43U, FormatCode = "_(* #,##0.00_);_(* \\(#,##0.00\\);_(* \"-\"??_);_(@_)"
            };

            numberingFormats1.Append(numberingFormat1);

            Fonts fonts1 = new Fonts()
            {
                Count = (UInt32Value)4U, KnownFonts = true
            };

            Font     font1     = new Font();
            FontSize fontSize1 = new FontSize()
            {
                Val = 11D
            };
            Color color1 = new Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName fontName1 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering1 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme1 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font1.Append(fontSize1);
            font1.Append(color1);
            font1.Append(fontName1);
            font1.Append(fontFamilyNumbering1);
            font1.Append(fontScheme1);

            Font     font2     = new Font();
            Bold     bold1     = new Bold();
            FontSize fontSize2 = new FontSize()
            {
                Val = 11D
            };
            Color color2 = new Color()
            {
                Theme = (UInt32Value)1U
            };
            FontName fontName2 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering2 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme2 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font2.Append(bold1);
            font2.Append(fontSize2);
            font2.Append(color2);
            font2.Append(fontName2);
            font2.Append(fontFamilyNumbering2);
            font2.Append(fontScheme2);

            Font     font3     = new Font();
            Bold     bold2     = new Bold();
            Italic   italic1   = new Italic();
            FontSize fontSize3 = new FontSize()
            {
                Val = 11D
            };
            Color color3 = new Color()
            {
                Rgb = "FFFF0000"
            };
            FontName fontName3 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering3 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme3 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font3.Append(bold2);
            font3.Append(italic1);
            font3.Append(fontSize3);
            font3.Append(color3);
            font3.Append(fontName3);
            font3.Append(fontFamilyNumbering3);
            font3.Append(fontScheme3);

            Font     font4     = new Font();
            Italic   italic2   = new Italic();
            FontSize fontSize4 = new FontSize()
            {
                Val = 11D
            };
            Color color4 = new Color()
            {
                Rgb = "FFFF0000"
            };
            FontName fontName4 = new FontName()
            {
                Val = "Calibri"
            };
            FontFamilyNumbering fontFamilyNumbering4 = new FontFamilyNumbering()
            {
                Val = 2
            };
            FontScheme fontScheme4 = new FontScheme()
            {
                Val = FontSchemeValues.Minor
            };

            font4.Append(italic2);
            font4.Append(fontSize4);
            font4.Append(color4);
            font4.Append(fontName4);
            font4.Append(fontFamilyNumbering4);
            font4.Append(fontScheme4);

            fonts1.Append(font1);
            fonts1.Append(font2);
            fonts1.Append(font3);
            fonts1.Append(font4);

            Fills fills1 = new Fills()
            {
                Count = (UInt32Value)4U
            };

            Fill        fill1        = new Fill();
            PatternFill patternFill1 = new PatternFill()
            {
                PatternType = PatternValues.None
            };

            fill1.Append(patternFill1);

            Fill        fill2        = new Fill();
            PatternFill patternFill2 = new PatternFill()
            {
                PatternType = PatternValues.Gray125
            };

            fill2.Append(patternFill2);

            Fill fill3 = new Fill();

            PatternFill patternFill3 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor1 = new ForegroundColor()
            {
                Theme = (UInt32Value)0U, Tint = -4.9989318521683403E-2D
            };
            BackgroundColor backgroundColor1 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill3.Append(foregroundColor1);
            patternFill3.Append(backgroundColor1);

            fill3.Append(patternFill3);

            Fill fill4 = new Fill();

            PatternFill patternFill4 = new PatternFill()
            {
                PatternType = PatternValues.Solid
            };
            ForegroundColor foregroundColor2 = new ForegroundColor()
            {
                Rgb = "FFFFFFCC"
            };
            BackgroundColor backgroundColor2 = new BackgroundColor()
            {
                Indexed = (UInt32Value)64U
            };

            patternFill4.Append(foregroundColor2);
            patternFill4.Append(backgroundColor2);

            fill4.Append(patternFill4);

            fills1.Append(fill1);
            fills1.Append(fill2);
            fills1.Append(fill3);
            fills1.Append(fill4);

            Borders borders1 = new Borders()
            {
                Count = (UInt32Value)2U
            };

            Border         border1         = new Border();
            LeftBorder     leftBorder1     = new LeftBorder();
            RightBorder    rightBorder1    = new RightBorder();
            TopBorder      topBorder1      = new TopBorder();
            BottomBorder   bottomBorder1   = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);

            Border      border2      = new Border();
            LeftBorder  leftBorder2  = new LeftBorder();
            RightBorder rightBorder2 = new RightBorder();

            TopBorder topBorder2 = new TopBorder()
            {
                Style = BorderStyleValues.Thin
            };
            Color color5 = new Color()
            {
                Indexed = (UInt32Value)64U
            };

            topBorder2.Append(color5);
            BottomBorder   bottomBorder2   = new BottomBorder();
            DiagonalBorder diagonalBorder2 = new DiagonalBorder();

            border2.Append(leftBorder2);
            border2.Append(rightBorder2);
            border2.Append(topBorder2);
            border2.Append(bottomBorder2);
            border2.Append(diagonalBorder2);

            borders1.Append(border1);
            borders1.Append(border2);

            CellStyleFormats cellStyleFormats1 = new CellStyleFormats()
            {
                Count = (UInt32Value)1U
            };
            CellFormat cellFormat1 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U
            };

            cellStyleFormats1.Append(cellFormat1);

            CellFormats cellFormats1 = new CellFormats()
            {
                Count = (UInt32Value)16U
            };
            CellFormat cellFormat2 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U
            };

            CellFormat cellFormat3 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment1 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Center
            };

            cellFormat3.Append(alignment1);
            CellFormat cellFormat4 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true
            };

            CellFormat cellFormat5 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)1U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment2 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Left
            };

            cellFormat5.Append(alignment2);

            CellFormat cellFormat6 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)1U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment3 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Center
            };

            cellFormat6.Append(alignment3);

            CellFormat cellFormat7 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment4 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Center
            };

            cellFormat7.Append(alignment4);

            CellFormat cellFormat8 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment5 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Right
            };

            cellFormat8.Append(alignment5);

            CellFormat cellFormat9 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment6 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Left
            };

            cellFormat9.Append(alignment6);

            CellFormat cellFormat10 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment7 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Center
            };

            cellFormat10.Append(alignment7);

            CellFormat cellFormat11 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)3U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment8 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Center
            };

            cellFormat11.Append(alignment8);
            CellFormat cellFormat12 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)43U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true, ApplyFont = true, ApplyFill = true
            };

            CellFormat cellFormat13 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)9U, FontId = (UInt32Value)0U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment9 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Left
            };

            cellFormat13.Append(alignment9);

            CellFormat cellFormat14 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true, ApplyAlignment = true
            };
            Alignment alignment10 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Center
            };

            cellFormat14.Append(alignment10);

            CellFormat cellFormat15 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)37U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)1U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true, ApplyFont = true, ApplyFill = true, ApplyBorder = true, ApplyAlignment = true
            };
            Alignment alignment11 = new Alignment()
            {
                Horizontal = HorizontalAlignmentValues.Center
            };

            cellFormat15.Append(alignment11);
            CellFormat cellFormat16 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)43U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)1U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true, ApplyFont = true, ApplyFill = true, ApplyBorder = true
            };
            CellFormat cellFormat17 = new CellFormat()
            {
                NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)1U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyBorder = true
            };

            cellFormats1.Append(cellFormat2);
            cellFormats1.Append(cellFormat3);
            cellFormats1.Append(cellFormat4);
            cellFormats1.Append(cellFormat5);
            cellFormats1.Append(cellFormat6);
            cellFormats1.Append(cellFormat7);
            cellFormats1.Append(cellFormat8);
            cellFormats1.Append(cellFormat9);
            cellFormats1.Append(cellFormat10);
            cellFormats1.Append(cellFormat11);
            cellFormats1.Append(cellFormat12);
            cellFormats1.Append(cellFormat13);
            cellFormats1.Append(cellFormat14);
            cellFormats1.Append(cellFormat15);
            cellFormats1.Append(cellFormat16);
            cellFormats1.Append(cellFormat17);

            CellStyles cellStyles1 = new CellStyles()
            {
                Count = (UInt32Value)1U
            };
            CellStyle cellStyle1 = new CellStyle()
            {
                Name = "Normal", FormatId = (UInt32Value)0U, BuiltinId = (UInt32Value)0U
            };

            cellStyles1.Append(cellStyle1);
            DifferentialFormats differentialFormats1 = new DifferentialFormats()
            {
                Count = (UInt32Value)0U
            };
            TableStyles tableStyles1 = new TableStyles()
            {
                Count = (UInt32Value)0U, DefaultTableStyle = "TableStyleMedium2", DefaultPivotStyle = "PivotStyleLight16"
            };

            StylesheetExtensionList stylesheetExtensionList1 = new StylesheetExtensionList();

            StylesheetExtension stylesheetExtension1 = new StylesheetExtension()
            {
                Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"
            };

            stylesheetExtension1.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            DocumentFormat.OpenXml.Office2010.Excel.SlicerStyles slicerStyles1 = new DocumentFormat.OpenXml.Office2010.Excel.SlicerStyles()
            {
                DefaultSlicerStyle = "SlicerStyleLight1"
            };

            stylesheetExtension1.Append(slicerStyles1);

            //StylesheetExtension stylesheetExtension2 = new StylesheetExtension(){ Uri = "{9260A510-F301-46a8-8635-F512D64BE5F5}" };
            //stylesheetExtension2.AddNamespaceDeclaration("x15", "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main");
            //X15.TimelineStyles timelineStyles1 = new X15.TimelineStyles(){ DefaultTimelineStyle = "TimeSlicerStyleLight1" };

            //stylesheetExtension2.Append(timelineStyles1);

            stylesheetExtensionList1.Append(stylesheetExtension1);
            //stylesheetExtensionList1.Append(stylesheetExtension2);

            stylesheet1.Append(numberingFormats1);
            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);
            stylesheet1.Append(tableStyles1);
            stylesheet1.Append(stylesheetExtensionList1);

            workbookStyles.Stylesheet = stylesheet1;
        }
コード例 #44
0
ファイル: ExcelHelper.cs プロジェクト: CourageAndrey/Workflow
 public static Border CreateBorder(
     Borders borders,
     BorderProperties left = null,
     BorderProperties right = null,
     BorderProperties top = null,
     BorderProperties bottom = null,
     BorderProperties diagonal = null)
 {
     var border = new Border();
     var leftBorder = new LeftBorder();
     if (left != null)
     {
         if (left.BorderStyle.HasValue)
         {
             leftBorder.Style = left.BorderStyle.Value;
         }
         if (left.Color != null)
         {
             leftBorder.Append(new Color { Indexed = left.Color });
         }
     }
     border.Append(leftBorder);
     var rightBorder = new RightBorder();
     if (right != null)
     {
         if (right.BorderStyle.HasValue)
         {
             rightBorder.Style = right.BorderStyle.Value;
         }
         if (right.Color != null)
         {
             rightBorder.Append(new Color { Indexed = right.Color });
         }
     }
     border.Append(rightBorder);
     var topBorder = new TopBorder();
     if (top != null)
     {
         if (top.BorderStyle.HasValue)
         {
             topBorder.Style = top.BorderStyle.Value;
         }
         if (top.Color != null)
         {
             topBorder.Append(new Color { Indexed = top.Color });
         }
     }
     border.Append(topBorder);
     var bottomBorder = new BottomBorder();
     if (bottom != null)
     {
         if (bottom.BorderStyle.HasValue)
         {
             bottomBorder.Style = bottom.BorderStyle.Value;
         }
         if (bottom.Color != null)
         {
             bottomBorder.Append(new Color { Indexed = bottom.Color });
         }
     }
     border.Append(bottomBorder);
     var diagonalBorder = new DiagonalBorder();
     if (diagonal != null)
     {
         if (diagonal.BorderStyle.HasValue)
         {
             diagonalBorder.Style = diagonal.BorderStyle.Value;
         }
         if (diagonal.Color != null)
         {
             diagonalBorder.Append(new Color { Indexed = diagonal.Color });
         }
     }
     border.Append(diagonalBorder);
     borders.Append(border);
     return border;
 }
コード例 #45
0
        /// <summary>
        /// Gets a category header row.
        /// </summary>
        /// <remarks>
        /// This method is used in Document assembly to create the first row for a category on the job description page
        /// </remarks>
        /// <returns>An assembled <see cref="T:DocumentFormat.OpenXml.Wordprocessing.TableRow"/></returns>
        public TableRow GetCategoryHeaderRow()
        {
            TableRow tableRow1 = new TableRow();

            TableRowProperties tableRowProperties1 = new TableRowProperties();
            TableRowHeight     tableRowHeight1     = new TableRowHeight()
            {
                Val = (UInt32Value)360U
            };
            TableJustification tableJustification1 = new TableJustification()
            {
                Val = TableRowAlignmentValues.Center
            };

            tableRowProperties1.Append(tableRowHeight1);
            tableRowProperties1.Append(tableJustification1);

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth      tableCellWidth1      = new TableCellWidth()
            {
                Width = "535", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders1 = new TableCellBorders();
            BottomBorder     bottomBorder1     = new BottomBorder()
            {
                Val = BorderValues.Nil
            };

            tableCellBorders1.Append(bottomBorder1);
            Shading shading1 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9"
            };

            tableCellProperties1.Append(tableCellWidth1);
            tableCellProperties1.Append(tableCellBorders1);
            tableCellProperties1.Append(shading1);

            Paragraph paragraph1 = new Paragraph();

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            KeepNext            keepNext1            = new KeepNext();
            Justification       justification1       = new Justification()
            {
                Val = JustificationValues.Center
            };

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            Bold     bold1     = new Bold();
            FontSize fontSize1 = new FontSize()
            {
                Val = "20"
            };

            paragraphMarkRunProperties1.Append(bold1);
            paragraphMarkRunProperties1.Append(fontSize1);

            paragraphProperties1.Append(keepNext1);
            paragraphProperties1.Append(justification1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run1 = new Run();

            RunProperties runProperties1 = new RunProperties();
            Bold          bold2          = new Bold();
            FontSize      fontSize2      = new FontSize()
            {
                Val = "20"
            };

            runProperties1.Append(bold2);
            runProperties1.Append(fontSize2);
            Text text1 = new Text();

            text1.Text = Weight.ToString();

            run1.Append(runProperties1);
            run1.Append(text1);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph1);

            TableCell tableCell2 = new TableCell();

            TableCellProperties tableCellProperties2 = new TableCellProperties();
            TableCellWidth      tableCellWidth2      = new TableCellWidth()
            {
                Width = "545", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders2 = new TableCellBorders();
            BottomBorder     bottomBorder2     = new BottomBorder()
            {
                Val = BorderValues.Nil
            };

            tableCellBorders2.Append(bottomBorder2);
            Shading shading2 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9"
            };

            tableCellProperties2.Append(tableCellWidth2);
            tableCellProperties2.Append(tableCellBorders2);
            tableCellProperties2.Append(shading2);

            Paragraph paragraph2 = new Paragraph();

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            KeepNext            keepNext2            = new KeepNext();

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            Bold     bold3     = new Bold();
            FontSize fontSize3 = new FontSize()
            {
                Val = "20"
            };

            paragraphMarkRunProperties2.Append(bold3);
            paragraphMarkRunProperties2.Append(fontSize3);

            paragraphProperties2.Append(keepNext2);
            paragraphProperties2.Append(paragraphMarkRunProperties2);

            Run run2 = new Run();

            RunProperties runProperties2 = new RunProperties();
            Bold          bold4          = new Bold();
            FontSize      fontSize4      = new FontSize()
            {
                Val = "20"
            };

            runProperties2.Append(bold4);
            runProperties2.Append(fontSize4);
            Text text2 = new Text();

            text2.Text = Letter + ":";

            run2.Append(runProperties2);
            run2.Append(text2);
            BookmarkStart bookmarkStart1 = new BookmarkStart()
            {
                Name = "_GoBack", Id = "0"
            };
            BookmarkEnd bookmarkEnd1 = new BookmarkEnd()
            {
                Id = "0"
            };

            paragraph2.Append(paragraphProperties2);
            paragraph2.Append(run2);
            paragraph2.Append(bookmarkStart1);
            paragraph2.Append(bookmarkEnd1);

            tableCell2.Append(tableCellProperties2);
            tableCell2.Append(paragraph2);

            TableCell tableCell3 = new TableCell();

            TableCellProperties tableCellProperties3 = new TableCellProperties();
            TableCellWidth      tableCellWidth3      = new TableCellWidth()
            {
                Width = "4902", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders3 = new TableCellBorders();
            RightBorder      rightBorder1      = new RightBorder()
            {
                Val = BorderValues.Nil
            };

            tableCellBorders3.Append(rightBorder1);
            Shading shading3 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9"
            };

            tableCellProperties3.Append(tableCellWidth3);
            tableCellProperties3.Append(tableCellBorders3);
            tableCellProperties3.Append(shading3);

            Paragraph paragraph3 = new Paragraph();

            ParagraphProperties paragraphProperties3 = new ParagraphProperties();
            KeepNext            keepNext3            = new KeepNext();

            ParagraphMarkRunProperties paragraphMarkRunProperties3 = new ParagraphMarkRunProperties();
            Bold     bold5     = new Bold();
            Caps     caps1     = new Caps();
            FontSize fontSize5 = new FontSize()
            {
                Val = "20"
            };
            Underline underline1 = new Underline()
            {
                Val = UnderlineValues.Single
            };

            paragraphMarkRunProperties3.Append(bold5);
            paragraphMarkRunProperties3.Append(caps1);
            paragraphMarkRunProperties3.Append(fontSize5);
            paragraphMarkRunProperties3.Append(underline1);

            paragraphProperties3.Append(keepNext3);
            paragraphProperties3.Append(paragraphMarkRunProperties3);

            Run run3 = new Run();

            RunProperties runProperties3 = new RunProperties();
            Bold          bold6          = new Bold();
            Caps          caps2          = new Caps();
            FontSize      fontSize6      = new FontSize()
            {
                Val = "20"
            };
            Underline underline2 = new Underline()
            {
                Val = UnderlineValues.Single
            };

            runProperties3.Append(bold6);
            runProperties3.Append(caps2);
            runProperties3.Append(fontSize6);
            runProperties3.Append(underline2);
            Text text3 = new Text();

            text3.Text = Title;

            run3.Append(runProperties3);
            run3.Append(text3);

            paragraph3.Append(paragraphProperties3);
            paragraph3.Append(run3);

            tableCell3.Append(tableCellProperties3);
            tableCell3.Append(paragraph3);

            TableCell tableCell4 = new TableCell();

            TableCellProperties tableCellProperties4 = new TableCellProperties();
            TableCellWidth      tableCellWidth4      = new TableCellWidth()
            {
                Width = "403", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders4 = new TableCellBorders();
            LeftBorder       leftBorder1       = new LeftBorder()
            {
                Val = BorderValues.Nil
            };
            RightBorder rightBorder2 = new RightBorder()
            {
                Val = BorderValues.Nil
            };

            tableCellBorders4.Append(leftBorder1);
            tableCellBorders4.Append(rightBorder2);
            Shading shading4 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9"
            };

            tableCellProperties4.Append(tableCellWidth4);
            tableCellProperties4.Append(tableCellBorders4);
            tableCellProperties4.Append(shading4);

            Paragraph paragraph4 = new Paragraph();

            ParagraphProperties paragraphProperties4 = new ParagraphProperties();
            KeepLines           keepLines1           = new KeepLines();

            ParagraphMarkRunProperties paragraphMarkRunProperties4 = new ParagraphMarkRunProperties();
            FontSize fontSize7 = new FontSize()
            {
                Val = "16"
            };
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript()
            {
                Val = "16"
            };

            paragraphMarkRunProperties4.Append(fontSize7);
            paragraphMarkRunProperties4.Append(fontSizeComplexScript1);

            paragraphProperties4.Append(keepLines1);
            paragraphProperties4.Append(paragraphMarkRunProperties4);

            paragraph4.Append(paragraphProperties4);

            tableCell4.Append(tableCellProperties4);
            tableCell4.Append(paragraph4);

            TableCell tableCell5 = new TableCell();

            TableCellProperties tableCellProperties5 = new TableCellProperties();
            TableCellWidth      tableCellWidth5      = new TableCellWidth()
            {
                Width = "5135", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders5 = new TableCellBorders();
            LeftBorder       leftBorder2       = new LeftBorder()
            {
                Val = BorderValues.Nil
            };

            tableCellBorders5.Append(leftBorder2);
            Shading shading5 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9"
            };

            tableCellProperties5.Append(tableCellWidth5);
            tableCellProperties5.Append(tableCellBorders5);
            tableCellProperties5.Append(shading5);

            Paragraph paragraph5 = new Paragraph();

            ParagraphProperties paragraphProperties5 = new ParagraphProperties();
            KeepLines           keepLines2           = new KeepLines();

            ParagraphMarkRunProperties paragraphMarkRunProperties5 = new ParagraphMarkRunProperties();
            FontSize fontSize8 = new FontSize()
            {
                Val = "16"
            };
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript()
            {
                Val = "16"
            };

            paragraphMarkRunProperties5.Append(fontSize8);
            paragraphMarkRunProperties5.Append(fontSizeComplexScript2);

            paragraphProperties5.Append(keepLines2);
            paragraphProperties5.Append(paragraphMarkRunProperties5);

            paragraph5.Append(paragraphProperties5);

            tableCell5.Append(tableCellProperties5);
            tableCell5.Append(paragraph5);

            tableRow1.Append(tableRowProperties1);
            tableRow1.Append(tableCell1);
            tableRow1.Append(tableCell2);
            tableRow1.Append(tableCell3);
            tableRow1.Append(tableCell4);
            tableRow1.Append(tableCell5);
            return(tableRow1);
        }
コード例 #46
0
        private TableCell CreateLastNoBorderCell()
        {
            TableCellProperties tableCellProperties = new TableCellProperties();

            TableCellWidth tableCellWidth = new TableCellWidth() { Type = TableWidthUnitValues.Auto };
            TableCellBorders tableCellBorders1 = new TableCellBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Nil };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Nil };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Nil };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Nil };

            tableCellBorders1.Append(topBorder1);
            tableCellBorders1.Append(leftBorder1);
            tableCellBorders1.Append(bottomBorder1);
            tableCellBorders1.Append(rightBorder1);

            tableCellProperties.Append(tableCellWidth);
            tableCellProperties.Append(tableCellBorders1);

            TableCell tableCell = new TableCell();
            tableCell.Append(tableCellProperties);
            tableCell.Append(CreateEmptyParagraph());
            return tableCell;
        }
コード例 #47
0
        /// <summary>
        /// Gets a category header row.
        /// </summary>
        /// <remarks>
        /// This method is used in Document assembly to create the details row for a category on the job description page
        /// </remarks>
        /// <returns>An assembled <see cref="T:DocumentFormat.OpenXml.Wordprocessing.TableRow"/></returns>
        public TableRow GenerateDetailsRow()
        {
            TableRow           tableRow1           = new TableRow();
            TableRowProperties tableRowProperties1 = new TableRowProperties();
            CantSplit          cantSplit1          = new CantSplit();
            TableRowHeight     tableRowHeight1     = new TableRowHeight()
            {
                Val = (UInt32Value)1063U
            };
            TableJustification tableJustification1 = new TableJustification()
            {
                Val = TableRowAlignmentValues.Center
            };

            tableRowProperties1.Append(cantSplit1);
            tableRowProperties1.Append(tableRowHeight1);
            tableRowProperties1.Append(tableJustification1);

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth      tableCellWidth1      = new TableCellWidth()
            {
                Width = "535", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders1 = new TableCellBorders();
            TopBorder        topBorder1        = new TopBorder()
            {
                Val = BorderValues.Nil
            };

            tableCellBorders1.Append(topBorder1);
            Shading shading1 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9"
            };

            tableCellProperties1.Append(tableCellWidth1);
            tableCellProperties1.Append(tableCellBorders1);
            tableCellProperties1.Append(shading1);

            Paragraph paragraph1 = new Paragraph();

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            Justification       justification1       = new Justification()
            {
                Val = JustificationValues.Center
            };

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            RunStyle runStyle1 = new RunStyle()
            {
                Val = "TimesLarge"
            };

            paragraphMarkRunProperties1.Append(runStyle1);

            paragraphProperties1.Append(justification1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            paragraph1.Append(paragraphProperties1);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph1);

            TableCell tableCell2 = new TableCell();

            TableCellProperties tableCellProperties2 = new TableCellProperties();
            TableCellWidth      tableCellWidth2      = new TableCellWidth()
            {
                Width = "545", Type = TableWidthUnitValues.Dxa
            };

            TableCellBorders tableCellBorders2 = new TableCellBorders();
            TopBorder        topBorder2        = new TopBorder()
            {
                Val = BorderValues.Nil
            };

            tableCellBorders2.Append(topBorder2);
            Shading shading2 = new Shading()
            {
                Val = ShadingPatternValues.Clear, Color = "auto", Fill = "D9D9D9"
            };

            tableCellProperties2.Append(tableCellWidth2);
            tableCellProperties2.Append(tableCellBorders2);
            tableCellProperties2.Append(shading2);

            Paragraph paragraph2 = new Paragraph();

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            RunStyle runStyle2 = new RunStyle()
            {
                Val = "TimesLarge"
            };

            paragraphMarkRunProperties2.Append(runStyle2);

            paragraphProperties2.Append(paragraphMarkRunProperties2);

            paragraph2.Append(paragraphProperties2);

            tableCell2.Append(tableCellProperties2);
            tableCell2.Append(paragraph2);

            TableCell tableCell3 = new TableCell();

            TableCellProperties tableCellProperties3 = new TableCellProperties();
            TableCellWidth      tableCellWidth3      = new TableCellWidth()
            {
                Width = "4902", Type = TableWidthUnitValues.Dxa
            };
            TableCellBorders tableCellBorders3 = new TableCellBorders();
            TopBorder        topBorder3        = new TopBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder3 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder3 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder3 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };

            tableCellBorders3.Append(topBorder3);
            tableCellBorders3.Append(leftBorder3);
            tableCellBorders3.Append(bottomBorder3);
            tableCellBorders3.Append(rightBorder3);

            tableCellProperties3.Append(tableCellWidth3);
            tableCellProperties3.Append(tableCellBorders3);
            foreach (PositionDescriptionItem p in PositionDescriptionItems)
            {
                Paragraph paragraph3 = new Paragraph();

                ParagraphProperties paragraphProperties3 = new ParagraphProperties();
                SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines()
                {
                    After = "100"
                };
                Indentation indentation1 = new Indentation()
                {
                    Left = "0", Hanging = "0"
                };

                ParagraphMarkRunProperties paragraphMarkRunProperties3 = new ParagraphMarkRunProperties();
                RunStyle runStyle3 = new RunStyle()
                {
                    Val = "TimesLarge"
                };
                Bold bold1 = new Bold()
                {
                    Val = false
                };
                Caps caps1 = new Caps()
                {
                    Val = false
                };
                FontSize fontSize1 = new FontSize()
                {
                    Val = "16"
                };
                FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript()
                {
                    Val = "16"
                };

                paragraphMarkRunProperties3.Append(runStyle3);
                paragraphMarkRunProperties3.Append(bold1);
                paragraphMarkRunProperties3.Append(caps1);
                paragraphMarkRunProperties3.Append(fontSize1);
                paragraphMarkRunProperties3.Append(fontSizeComplexScript1);
                paragraphProperties3.Append(spacingBetweenLines3);
                paragraphProperties3.Append(paragraphMarkRunProperties3);
                paragraphProperties3.Append(indentation1);
                ProofError proofError1 = new ProofError()
                {
                    Type = ProofingErrorValues.SpellStart
                };

                Run run1 = new Run();

                RunProperties runProperties1 = new RunProperties();
                RunStyle      runStyle4      = new RunStyle()
                {
                    Val = "TimesLarge"
                };
                Bold bold2 = new Bold()
                {
                    Val = false
                };
                Caps caps2 = new Caps()
                {
                    Val = false
                };
                FontSize fontSize2 = new FontSize()
                {
                    Val = "16"
                };
                FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript()
                {
                    Val = "16"
                };

                runProperties1.Append(runStyle4);
                runProperties1.Append(bold2);
                runProperties1.Append(caps2);
                runProperties1.Append(fontSize2);
                runProperties1.Append(fontSizeComplexScript2);
                Text text1 = new Text();
                text1.Text = p.Detail;

                run1.Append(runProperties1);
                run1.Append(text1);
                ProofError proofError2 = new ProofError()
                {
                    Type = ProofingErrorValues.SpellEnd
                };

                paragraph3.Append(paragraphProperties3);
                //paragraph3.Append(proofError1);
                paragraph3.Append(run1);
                //paragraph3.Append(proofError2);


                tableCell3.Append(paragraph3);
            } // To Here?
            tableCell3.Append(tableCellProperties3);
            TableCell tableCell4 = new TableCell();

            TableCellProperties tableCellProperties4 = new TableCellProperties();
            TableCellWidth      tableCellWidth4      = new TableCellWidth()
            {
                Width = "5538", Type = TableWidthUnitValues.Dxa
            };
            TableCellBorders tableCellBorders4 = new TableCellBorders();
            TopBorder        topBorder4        = new TopBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            LeftBorder leftBorder4 = new LeftBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            BottomBorder bottomBorder4 = new BottomBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };
            RightBorder rightBorder4 = new RightBorder()
            {
                Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U
            };

            tableCellBorders4.Append(topBorder4);
            tableCellBorders4.Append(leftBorder4);
            tableCellBorders4.Append(bottomBorder4);
            tableCellBorders4.Append(rightBorder4);
            GridSpan gridSpan1 = new GridSpan()
            {
                Val = 2
            };

            tableCellProperties4.Append(tableCellWidth4);
            tableCellProperties4.Append(gridSpan1);
            tableCellProperties4.Append(tableCellBorders4);
            int bulletListCount = 1;

            foreach (PerformanceStandardItem p in PerformanceStandardItems)
            {
                Paragraph           paragraph4           = new Paragraph();
                ParagraphProperties paragraphProperties4 = new ParagraphProperties();
                SpacingBetweenLines spacingBetweenLines4 = new SpacingBetweenLines()
                {
                    After = "100"
                };

                ParagraphMarkRunProperties paragraphMarkRunProperties4 = new ParagraphMarkRunProperties();
                FontSize fontSize3 = new FontSize()
                {
                    Val = "16"
                };
                FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript()
                {
                    Val = "16"
                };
                Indentation indentation4 = new Indentation()
                {
                    Left = "270", Hanging = "270"
                };

                paragraphMarkRunProperties4.Append(fontSize3);
                paragraphMarkRunProperties4.Append(fontSizeComplexScript3);
                paragraphProperties4.Append(indentation4);
                paragraphProperties4.Append(spacingBetweenLines4);
                paragraphProperties4.Append(paragraphMarkRunProperties4);
                ProofError proofError3 = new ProofError()
                {
                    Type = ProofingErrorValues.SpellStart
                };

                Run run2 = new Run();

                RunProperties runProperties2 = new RunProperties();
                FontSize      fontSize4      = new FontSize()
                {
                    Val = "16"
                };
                FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript()
                {
                    Val = "16"
                };

                runProperties2.Append(fontSize4);
                runProperties2.Append(fontSizeComplexScript4);
                Text text2 = new Text();
                text2.Text = $"{Letter}{bulletListCount}: {p.Detail}";
                bulletListCount++;
                run2.Append(runProperties2);
                run2.Append(text2);
                ProofError proofError4 = new ProofError()
                {
                    Type = ProofingErrorValues.SpellEnd
                };

                paragraph4.Append(paragraphProperties4);
                paragraph4.Append(proofError3);
                paragraph4.Append(run2);
                paragraph4.Append(proofError4);


                tableCell4.Append(paragraph4);
            }
            tableCell4.Append(tableCellProperties4);
            tableRow1.Append(tableRowProperties1);
            tableRow1.Append(tableCell1);
            tableRow1.Append(tableCell2);
            tableRow1.Append(tableCell3);
            tableRow1.Append(tableCell4);
            return(tableRow1);
        }
コード例 #48
0
        private TableCell CreateUnderlineCell(int cellWidth)
        {
            TableCellProperties tableCellProperties8 = new TableCellProperties();
            TableCellWidth tableCellWidth8 = new TableCellWidth() { Width = cellWidth.ToString(), Type = TableWidthUnitValues.Dxa };

            TableCellBorders tableCellBorders1 = new TableCellBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Nil };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Nil };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)2U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Nil };

            tableCellBorders1.Append(topBorder1);
            tableCellBorders1.Append(leftBorder1);
            tableCellBorders1.Append(bottomBorder1);
            tableCellBorders1.Append(rightBorder1);

            tableCellProperties8.Append(tableCellWidth8);
            tableCellProperties8.Append(tableCellBorders1);

            TableCell tableCell = new TableCell();
            tableCell.Append(tableCellProperties8);
            tableCell.Append(CreateEmptyParagraph());
            return tableCell;
        }
コード例 #49
0
        // Generates content of workbookStyles.
        private void GenerateWorkbookStylesContent(WorkbookStylesPart workbookStyles)
        {
            Stylesheet stylesheet1 = new Stylesheet(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "x14ac" }  };
            stylesheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            stylesheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");

            NumberingFormats numberingFormats1 = new NumberingFormats(){ Count = (UInt32Value)1U };
            NumberingFormat numberingFormat1 = new NumberingFormat(){ NumberFormatId = (UInt32Value)43U, FormatCode = "_(* #,##0.00_);_(* \\(#,##0.00\\);_(* \"-\"??_);_(@_)" };

            numberingFormats1.Append(numberingFormat1);

            Fonts fonts1 = new Fonts(){ Count = (UInt32Value)4U, KnownFonts = true };

            Font font1 = new Font();
            FontSize fontSize1 = new FontSize(){ Val = 11D };
            Color color1 = new Color(){ Theme = (UInt32Value)1U };
            FontName fontName1 = new FontName(){ Val = "Calibri" };
            FontFamilyNumbering fontFamilyNumbering1 = new FontFamilyNumbering(){ Val = 2 };
            FontScheme fontScheme1 = new FontScheme(){ Val = FontSchemeValues.Minor };

            font1.Append(fontSize1);
            font1.Append(color1);
            font1.Append(fontName1);
            font1.Append(fontFamilyNumbering1);
            font1.Append(fontScheme1);

            Font font2 = new Font();
            Bold bold1 = new Bold();
            FontSize fontSize2 = new FontSize(){ Val = 11D };
            Color color2 = new Color(){ Theme = (UInt32Value)1U };
            FontName fontName2 = new FontName(){ Val = "Calibri" };
            FontFamilyNumbering fontFamilyNumbering2 = new FontFamilyNumbering(){ Val = 2 };
            FontScheme fontScheme2 = new FontScheme(){ Val = FontSchemeValues.Minor };

            font2.Append(bold1);
            font2.Append(fontSize2);
            font2.Append(color2);
            font2.Append(fontName2);
            font2.Append(fontFamilyNumbering2);
            font2.Append(fontScheme2);

            Font font3 = new Font();
            Bold bold2 = new Bold();
            Italic italic1 = new Italic();
            FontSize fontSize3 = new FontSize(){ Val = 11D };
            Color color3 = new Color(){ Rgb = "FFFF0000" };
            FontName fontName3 = new FontName(){ Val = "Calibri" };
            FontFamilyNumbering fontFamilyNumbering3 = new FontFamilyNumbering(){ Val = 2 };
            FontScheme fontScheme3 = new FontScheme(){ Val = FontSchemeValues.Minor };

            font3.Append(bold2);
            font3.Append(italic1);
            font3.Append(fontSize3);
            font3.Append(color3);
            font3.Append(fontName3);
            font3.Append(fontFamilyNumbering3);
            font3.Append(fontScheme3);

            Font font4 = new Font();
            Italic italic2 = new Italic();
            FontSize fontSize4 = new FontSize(){ Val = 11D };
            Color color4 = new Color(){ Rgb = "FFFF0000" };
            FontName fontName4 = new FontName(){ Val = "Calibri" };
            FontFamilyNumbering fontFamilyNumbering4 = new FontFamilyNumbering(){ Val = 2 };
            FontScheme fontScheme4 = new FontScheme(){ Val = FontSchemeValues.Minor };

            font4.Append(italic2);
            font4.Append(fontSize4);
            font4.Append(color4);
            font4.Append(fontName4);
            font4.Append(fontFamilyNumbering4);
            font4.Append(fontScheme4);

            fonts1.Append(font1);
            fonts1.Append(font2);
            fonts1.Append(font3);
            fonts1.Append(font4);

            Fills fills1 = new Fills(){ Count = (UInt32Value)4U };

            Fill fill1 = new Fill();
            PatternFill patternFill1 = new PatternFill(){ PatternType = PatternValues.None };

            fill1.Append(patternFill1);

            Fill fill2 = new Fill();
            PatternFill patternFill2 = new PatternFill(){ PatternType = PatternValues.Gray125 };

            fill2.Append(patternFill2);

            Fill fill3 = new Fill();

            PatternFill patternFill3 = new PatternFill(){ PatternType = PatternValues.Solid };
            ForegroundColor foregroundColor1 = new ForegroundColor(){ Theme = (UInt32Value)0U, Tint = -4.9989318521683403E-2D };
            BackgroundColor backgroundColor1 = new BackgroundColor(){ Indexed = (UInt32Value)64U };

            patternFill3.Append(foregroundColor1);
            patternFill3.Append(backgroundColor1);

            fill3.Append(patternFill3);

            Fill fill4 = new Fill();

            PatternFill patternFill4 = new PatternFill(){ PatternType = PatternValues.Solid };
            ForegroundColor foregroundColor2 = new ForegroundColor(){ Rgb = "FFFFFFCC" };
            BackgroundColor backgroundColor2 = new BackgroundColor(){ Indexed = (UInt32Value)64U };

            patternFill4.Append(foregroundColor2);
            patternFill4.Append(backgroundColor2);

            fill4.Append(patternFill4);

            fills1.Append(fill1);
            fills1.Append(fill2);
            fills1.Append(fill3);
            fills1.Append(fill4);

            Borders borders1 = new Borders(){ Count = (UInt32Value)2U };

            Border border1 = new Border();
            LeftBorder leftBorder1 = new LeftBorder();
            RightBorder rightBorder1 = new RightBorder();
            TopBorder topBorder1 = new TopBorder();
            BottomBorder bottomBorder1 = new BottomBorder();
            DiagonalBorder diagonalBorder1 = new DiagonalBorder();

            border1.Append(leftBorder1);
            border1.Append(rightBorder1);
            border1.Append(topBorder1);
            border1.Append(bottomBorder1);
            border1.Append(diagonalBorder1);

            Border border2 = new Border();
            LeftBorder leftBorder2 = new LeftBorder();
            RightBorder rightBorder2 = new RightBorder();

            TopBorder topBorder2 = new TopBorder(){ Style = BorderStyleValues.Thin };
            Color color5 = new Color(){ Indexed = (UInt32Value)64U };

            topBorder2.Append(color5);
            BottomBorder bottomBorder2 = new BottomBorder();
            DiagonalBorder diagonalBorder2 = new DiagonalBorder();

            border2.Append(leftBorder2);
            border2.Append(rightBorder2);
            border2.Append(topBorder2);
            border2.Append(bottomBorder2);
            border2.Append(diagonalBorder2);

            borders1.Append(border1);
            borders1.Append(border2);

            CellStyleFormats cellStyleFormats1 = new CellStyleFormats(){ Count = (UInt32Value)1U };
            CellFormat cellFormat1 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U };

            cellStyleFormats1.Append(cellFormat1);

            CellFormats cellFormats1 = new CellFormats(){ Count = (UInt32Value)16U };
            CellFormat cellFormat2 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)0U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U };

            CellFormat cellFormat3 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment1 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Center };

            cellFormat3.Append(alignment1);
            CellFormat cellFormat4 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true };

            CellFormat cellFormat5 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)1U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment2 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Left };

            cellFormat5.Append(alignment2);

            CellFormat cellFormat6 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)1U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment3 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Center };

            cellFormat6.Append(alignment3);

            CellFormat cellFormat7 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment4 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Center };

            cellFormat7.Append(alignment4);

            CellFormat cellFormat8 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment5 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Right };

            cellFormat8.Append(alignment5);

            CellFormat cellFormat9 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment6 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Left };

            cellFormat9.Append(alignment6);

            CellFormat cellFormat10 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment7 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Center };

            cellFormat10.Append(alignment7);

            CellFormat cellFormat11 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)3U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment8 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Center };

            cellFormat11.Append(alignment8);
            CellFormat cellFormat12 = new CellFormat(){ NumberFormatId = (UInt32Value)43U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true, ApplyFont = true, ApplyFill = true };

            CellFormat cellFormat13 = new CellFormat(){ NumberFormatId = (UInt32Value)9U, FontId = (UInt32Value)0U, FillId = (UInt32Value)3U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment9 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Left };

            cellFormat13.Append(alignment9);

            CellFormat cellFormat14 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)0U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)0U, FormatId = (UInt32Value)0U, ApplyFill = true, ApplyAlignment = true };
            Alignment alignment10 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Center };

            cellFormat14.Append(alignment10);

            CellFormat cellFormat15 = new CellFormat(){ NumberFormatId = (UInt32Value)37U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)1U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true, ApplyFont = true, ApplyFill = true, ApplyBorder = true, ApplyAlignment = true };
            Alignment alignment11 = new Alignment(){ Horizontal = HorizontalAlignmentValues.Center };

            cellFormat15.Append(alignment11);
            CellFormat cellFormat16 = new CellFormat(){ NumberFormatId = (UInt32Value)43U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)1U, FormatId = (UInt32Value)0U, ApplyNumberFormat = true, ApplyFont = true, ApplyFill = true, ApplyBorder = true };
            CellFormat cellFormat17 = new CellFormat(){ NumberFormatId = (UInt32Value)0U, FontId = (UInt32Value)2U, FillId = (UInt32Value)2U, BorderId = (UInt32Value)1U, FormatId = (UInt32Value)0U, ApplyFont = true, ApplyFill = true, ApplyBorder = true };

            cellFormats1.Append(cellFormat2);
            cellFormats1.Append(cellFormat3);
            cellFormats1.Append(cellFormat4);
            cellFormats1.Append(cellFormat5);
            cellFormats1.Append(cellFormat6);
            cellFormats1.Append(cellFormat7);
            cellFormats1.Append(cellFormat8);
            cellFormats1.Append(cellFormat9);
            cellFormats1.Append(cellFormat10);
            cellFormats1.Append(cellFormat11);
            cellFormats1.Append(cellFormat12);
            cellFormats1.Append(cellFormat13);
            cellFormats1.Append(cellFormat14);
            cellFormats1.Append(cellFormat15);
            cellFormats1.Append(cellFormat16);
            cellFormats1.Append(cellFormat17);

            CellStyles cellStyles1 = new CellStyles(){ Count = (UInt32Value)1U };
            CellStyle cellStyle1 = new CellStyle(){ Name = "Normal", FormatId = (UInt32Value)0U, BuiltinId = (UInt32Value)0U };

            cellStyles1.Append(cellStyle1);
            DifferentialFormats differentialFormats1 = new DifferentialFormats(){ Count = (UInt32Value)0U };
            TableStyles tableStyles1 = new TableStyles(){ Count = (UInt32Value)0U, DefaultTableStyle = "TableStyleMedium2", DefaultPivotStyle = "PivotStyleLight16" };

            StylesheetExtensionList stylesheetExtensionList1 = new StylesheetExtensionList();

            StylesheetExtension stylesheetExtension1 = new StylesheetExtension(){ Uri = "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" };
            stylesheetExtension1.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            DocumentFormat.OpenXml.Office2010.Excel.SlicerStyles slicerStyles1 = new DocumentFormat.OpenXml.Office2010.Excel.SlicerStyles(){ DefaultSlicerStyle = "SlicerStyleLight1" };

            stylesheetExtension1.Append(slicerStyles1);

            //StylesheetExtension stylesheetExtension2 = new StylesheetExtension(){ Uri = "{9260A510-F301-46a8-8635-F512D64BE5F5}" };
            //stylesheetExtension2.AddNamespaceDeclaration("x15", "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main");
            //X15.TimelineStyles timelineStyles1 = new X15.TimelineStyles(){ DefaultTimelineStyle = "TimeSlicerStyleLight1" };

            //stylesheetExtension2.Append(timelineStyles1);

            stylesheetExtensionList1.Append(stylesheetExtension1);
            //stylesheetExtensionList1.Append(stylesheetExtension2);

            stylesheet1.Append(numberingFormats1);
            stylesheet1.Append(fonts1);
            stylesheet1.Append(fills1);
            stylesheet1.Append(borders1);
            stylesheet1.Append(cellStyleFormats1);
            stylesheet1.Append(cellFormats1);
            stylesheet1.Append(cellStyles1);
            stylesheet1.Append(differentialFormats1);
            stylesheet1.Append(tableStyles1);
            stylesheet1.Append(stylesheetExtensionList1);

            workbookStyles.Stylesheet = stylesheet1;
        }