Issue in Row Height

HI
I have the folwoing code to adjust the row height of the word document

Aspose.Words.Documents objWordDoc = new Aspose.Words.Documents();
Aspose.Words.Tables.Table NewTable = new Aspose.Words.Tables.Table(objWordDoc);
Section section = new Section(objWordDoc);
objWordDoc.AppendChild(section);
Body body = new Body(objWordDoc);
section.AppendChild(body);
body.AppendChild(NewTable);
Aspose.Words.Tables.Row row = new Aspose.Words.Tables.Row(objWordDoc);
row.RowFormat.AllowBreakAcrossPages = true;
NewTable.AppendChild(row);
for (int i = 0; i <counter; i++)
{
    Aspose.Words.Tables.Cell cell = new Aspose.Words.Tables.Cell(objWordDoc);
    cell.CellFormat.Borders.Top.LineStyle = LineStyle.Single;
    cell.CellFormat.Borders.Left.LineStyle = LineStyle.Single;
    cell.CellFormat.Borders.Right.LineStyle = LineStyle.Single;
    cell.CellFormat.Borders.Bottom.LineStyle = LineStyle.Single;
    cell.CellFormat.LeftPadding = 2;
    cell.CellFormat.RightPadding = 2;
    cell.CellFormat.BottomPadding = 0.1;
    cell.CellFormat.TopPadding = 2;
    cell.CellFormat.WrapText = true;
    row.RowFormat.AllowAutoFit = true;
    row.RowFormat.Height = 0.1;
    row.RowFormat.HeightRule = HeightRule.AtLeast;
    row.AppendChild(cell.Clone(false));
    row.LastCell.AppendChild(new Paragraph(objWordDoc));
}

But my problem is still the row height is not changing.Am attaching the output please see the height of the row in that.
using same code what i need to changeā€¦

Hi Ajeesh,

Thanks for your query. I have worked with your shared document and found that the paragraphs has 12pt space after. That is the reason you can not decrease the row height. Please check the attached image file.

Please let us know if you have any more queries.

Hi
Thanks for your reply.As you there is a 12pt space after,but am not giving that,its coming automatically,so how can i remove that spacing?

Hi Ajeesh,

You can remove space after a paragraph by using following code snippet.

Document doc = new Document(MyDir + "Test.docx");

Table table = (Table) doc.GetChild(NodeType.Table, 0, true);
foreach(Row row in table.Rows)
{
    foreach(Cell cell in row.Cells)
    {
        foreach(Paragraph para in cell.Paragraphs)
        {
            para.ParagraphFormat.SpaceAfter = 1;
        }
    }
}
doc.Save(MyDir + "AsposeOut.docx");

Please let us know if you have any more queries.