I'm new to Aspose.Words for .Net specifically Tables, and working on recreating some documents for a customer , and i want to create a table with severel rows and columns dynamically, my question is that how make the style Overline to a Text in cell (like the picture bellow : ex: cell in Yellow) ?
I searched too much in documentation but i found only the style for the pdf, i need it for Aspose Word ! can any one help me please !!!
CodePudding user response:
You can achieve this by setting top border of the Paragraph
. For example see the following code:
Document doc = new Document(@"C:\Temp\in.docx");
Table table = doc.FirstSection.Body.Tables[0];
foreach (Paragraph p in table.Rows[2].Cells[3].Paragraphs)
p.ParagraphFormat.Borders.Top.LineWidth = 1;
doc.Save(@"C:\Temp\out.docx");