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
- 4.1K All Categories
- 61 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 260 Administration
- 212 Portal
- 489 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 219 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions