Insert table rows in New page

Hi,
How can i write each row from the following table in new page…?

Column Datatype NULL Description
OWNER VARCHAR2(30) NOT NULL Owner of the table, view, or cluster
TABLE_NAME VARCHAR2(30) NOT NULL Name of the table, view, or cluster
COLUMN_NAME VARCHAR2(30) NOT NULL Column name
DATA_TYPE VARCHAR2(106) Datatype of the column
DATA_TYPE_MOD VARCHAR2(3) Datatype modifier of the column

Hi,
Thanks for your inquiry. Please use Aspose.Words for .NET 17.12.0 version and try following code. Hope this helps you.

Document doc = new Document(dataDir + "Table.docx");
Document doc1 = new Document();
DocumentBuilder builder = new DocumentBuilder(doc1);
// Get your table form the document.
Table table = doc.FirstSection.Body.Tables[0];
for (int i = 0; i < table.Rows.Count; i++)
{
    Row row = table.Rows[i];
    builder.StartTable();
    for (int j = 0; j < row.Cells.Count; j++)
    {
        builder.InsertCell();
        builder.Write(row.Cells[j].GetText());
    }
    builder.EndRow();
    builder.EndTable();
    if (table.Rows.Count > i + 1)
        builder.InsertBreak(BreakType.PageBreak);
}
doc1.Save(dataDir + "Table_out.docx", SaveFormat.Docx);

I have attached the document generated from the above code snippet. If you still face problems, please let us know we will try to help you as much we can. Thanks.

Thank you So much for reply…
Really Helpful…

Narendran

In My document empty page is created at the last when i insert page break…

How can i avoid…? Help me

Thanks
Narendran

Hi Narendran,

Thanks for your inquiry. Could you please attach your Aspose.Words generated output Word document here for testing? We will investigate the issue on our end and provide you code to remove empty page from the end.

Best regards,