Hi Soe,
Row row = table.Rows[1];<o:p></o:p>
row.Remove();
NodeCollection tables = doc.GetChildNodes(NodeType.Table, true);
Table table = (Table)tables[0];
Cell cell = table.Rows[0].Cells[0];
Paragraph paragraph = cell.Paragraphs[0];
Run run = paragraph.Runs[0];
// Set font formatting properties
Aspose.Words.Font font = run.Font;
font.Size = 20;
font.Bold = false;
font.Color = System.Drawing.Color.Green;
font.Name = "Verdana";
// Set paragraph formatting
ParagraphFormat paragraphFormat = paragraph.ParagraphFormat;
paragraphFormat.FirstLineIndent = 8;
paragraphFormat.Alignment = ParagraphAlignment.Justify;
paragraphFormat.KeepTogether = true;
Hi Awais,
Thanks for your reply. The code snippets you provided above is really helpful to figure out the issue i am facing. Another question is it is possible to adjust the height of the individual row inside a table? when i use row.rowFormat.Height = 0.01, it doesn’t work. The following is the code snippets. what i intend to do is i
want to reduce the height of some rows inside a table.
for (int i = 0; i < intCellCount; i++)
{
for (int j = 0; j < row.Cells[i].Paragraphs.Count; j++)
{
for (int k = 0; k < row.Cells[i].Paragraphs[j].Runs.Count; k++)
{
row.Cells[i].Paragraphs[j].Runs[k].Font.Size = 0.01;
}
}
}
row.RowFormat.Height = 0.00;
row.RowFormat.HeightRule = HeightRule.Exactly;
Appreciate your help. Thank you so much.
Hi,