How to Iterate tables in a document

  • I need to be able to open a document and then iterate through the tables that are contained within the document.

    For each table, I need to alter the table rows based upon the contents of a dataset which will not be known until runtime.

    In MS Word, "Tables" is a list within the document - what's the equivalent in WPTools?

    Thanks,
    =Bill

    • Offizieller Beitrag

    Hi,

    the best is to do this:

    Julian

    • Offizieller Beitrag

    CreateRow works together with CreateTable. It does not simple duplicate a row but creates a working object to create one cell after each other.

    See this demo:

    var par, row : TParagraph;

    This is from the calculation demo.

    • Offizieller Beitrag

    They have been added to WPTools 5.09 - its not in the demo yet.

    You see the effect in the multidemo in the second WPReporter demo (for calculation in tables)

    The new WPTools 5.10 demo should be out next week.

    You can also use
    TParagraph.Duplicate
    to create a new row.

    RowAppend is implemented like this:

    Julian Ziersch