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!
-
Hi,
Have you tried using the Replace Text in Word Document step? The step takes in a document and can replace specific keywords, either tokens or bookmarks, and give you fields that can be filled in. I would recommend using the Token mode instead of Bookmarks. Tokens are phrases indicated by surrounding the name with a start and end character. By default, the start and end token characters are the curly brackets. If needed, you are able to change the characters used to define the start and end tokens. You can upload the document as file data or have it statically added.
For instance, in a word document, the phrase {example1} would appear in the step as a field to fill out. You can see it here in the screenshot below.
I hope this helps!
~David G
Howdy, Stranger!
Categories
- 2.1K All Categories
- 18 General
- 155 Installation / Setup
- 991 Flows
- 86 Rules
- 203 Administration
- 204 Portal
- 433 General Q & A
- 600 Forms
- 282 Reports
- 3 Designer Extensions
- 38 Example Flows
- 32 CSS Examples
- 1 Diagram Tile
- 5 Javascript Controls
- 139 Pages
- 1 Process Mining
- New Features
- 150 Datastructures
- 50 Repository
- 169 Integrations
- 25 Multi-Tenant
- 21 SDK
- 40 Modules
- 38 Settings
- 20 Active Directory
- 12 Version 7
- 34 Version 8