You must Sign In to post a response.
  • Category: ASP.NET

    Read merged cells in interop word C#

    How to read the merged cells using interop. Facing issue "cannot access individual rows in this collection because the table has vertically merged cells".

    Code tried: string text= table.Rows[0].Range.Text;

    Name Gender Results IssueId
    Male Female
    Reynold - Yes Available SK0056

    Expected results(by removing the cell value 'Gender')

    Name Male Female Results IssueId
    Reynold - Yes Available SK0056
  • #769278
    Hi, you can use Spire.Doc to access the value from a merged cell.

    Document doc = new Document;
    Table table = (Table)doc.Sections[0].Tables[0];
    string text= table.Rows[0].Cells[0].Paragraphs[0].Text;

  • Sign In to post your comments