AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Windows grid table in word8/18/2023 WTableStyle tableStyle = ("Medium Shading 1 Accent 1", StyleType.TableStyle) as WTableStyle Gets the table style (Medium Shading 1 Accent 1) from the styles collection. Creates new Word document instance for Word processing. The following code example illustrates how to access and modify an existing table style from a Word document (DOCX). Using Syncfusion Word Library, you can access a table style from a Word document using its style name and modify the properties of the table style programmatically in a few lines of code. The complete working example can be downloaded from this GitHub location. Generated Word document with built-in table style Medium Shading 1 Accent 1 Table.ApplyStyle(BuiltinTableStyle.MediumShading1Accent1) Applies the built-in table style (Medium Shading 1 Accent 1) to the table. Table.AddParagraph().AppendText("Country") Table.AddParagraph().AppendText("Address") Table.AddParagraph().AppendText("Contact Name") Table.AddParagraph().AppendText("Company Name") Table.AddParagraph().AppendText("Supplier ID") WTable table = section.AddTable() as WTable WParagraphStyle style = ("Normal") as WParagraphStyle Modifies the font size to 10 for default paragraph style. IWTextRange textRange = paragraph.AppendText("Suppliers") IWParagraph paragraph = section.AddParagraph() IWSection section = document.AddSection() Using (WordDocument document = new WordDocument()) The following code example illustrates how to apply the built-in table style “Medium Shading 1 Accent 1” to a table created from scratch in a Word document (DOCX). Using Syncfusion Word Library, you can apply any of these built-in table styles to a table programmatically with just a single line of code. Microsoft Word provides various built-in table styles to customize the look and feel of tables in Word documents. Apply built-in table styles to a Word table created from scratch in C# Refer to our documentation for more information about enabling and disabling the style options of a table programmatically. Last row last cell-Holds special formatting that can be applied to the last row’s last cell (bottom-right corner cell).Įven if a table style has definitions for all of these types of conditional formats, you can enable or disable the special formatting for a table through its table style options.Last row first cell-Holds special formatting that can be applied to the last row’s first cell (bottom-left corner cell).First row last cell-Holds special formatting that can be applied to the first row’s last cell (top-right corner cell).First row first cell-Holds special formatting that can be applied to the first row’s first cell (top-left corner cell).Last column-Holds special formatting that can be applied to the last column.First column-Holds special formatting that can be applied to the first column.Last row-Holds special formatting that can be applied to the last row.
0 Comments
Read More
Leave a Reply. |