Free Support Forum - aspose.com

Not able to fetch serial number from a table


#1

while iterating data from a table of a document, auto generated serial number is not being recognized.
How can I get serial number as a text?


#2

@patrick1306,

Please ZIP and upload your input document (you are getting this problem with) here for testing. We will then investigate the issue on our end and provide you more information.


#3

Here is the attached document.

TestDocument.zip (12.2 KB)


#4

@patrick1306,

Please try using the following code:

Document doc = new Document("E:\\TestDocument\\New DOCX Document.docx");
doc.UpdateListLabels();
Table tab = (Table)doc.GetChildNodes(NodeType.Table, true)[0];
foreach(Row row in tab.Rows)
{
    Console.WriteLine(row.FirstCell.ToString(SaveFormat.Text));
} 

Hope, this helps.


#5

It worked. Thank you very much @awais.hafeez.:slightly_smiling_face: