Mohit Khandelwal
Mohit Khandelwal

Reputation: 21

Nova Code is not converting data to numeric order instead converting to alphabetical order in word document in c#

if (item.Name == "ol")
    {
         int bulletposition = 1;

         List UDFList1 = doc.AddList("", 0, NV.ListItemType.Numbered , 1);
             foreach (var innerItem in item.ChildNodes)
                 {
                     string bal = innerItem.InnerText.Replace("\r\n", "").Replace("\n", "").Replace("\r", "").Trim();

                     doc.AddListItem(UDFList1, bal, bulletposition);
                 }
                     doc.InsertList(UDFList1);
                     doc.InsertParagraph(" ", false);
     }

This is my code to convert html in word format where the html tag starts with . In this case the convert word document should be in numeric order starting with 1 then 2 and goes on but the result is in alphabetical order i.e a then b and goes on.enter image description here

Upvotes: 2

Views: 70

Answers (0)

Related Questions