Replace list of string in Word document Table

Replace list of string in Word document Table

Comments

  • Hi everyone,

    Im currently working on a project where I need to fetch data from an external source and insert it into a Word document in a table format. The Word document has a specific table format that needs to be followed. However, the fetch query can return different numbers of results, including zero results, one result, or more than 60 rows depending on the database tables entries.

    Im looking for advice on how to have a dynamic replace text in the Word document logic that can keep the static text and company logo as is but only replace the tokens of the table with the query results, regardless of the number of results.

    One idea I had was to use a merge HTML table if the query result returns more than one row and somehow place this table on the provided Word doc, which is only one page with a blank table. Im wondering if this is a viable option, and if not, what other methods can be used to achieve the desired outcome.

    FYI, I have 5 columns in total

    Any guidance or suggestions would be greatly appreciated. Thanks in advance!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!