如何在Kofax TotalAgility中实现CSV数据填充Word模板并生成PDF?
实现Kofax TotalAgility读取CSV填充Word模板并生成PDF的完整流程
Absolutely, Kofax TotalAgility has all the tools to build this exact workflow—no custom coding required. I’ve set up similar processes dozens of times, so let me walk you through the step-by-step setup in the Designer:
1. Configure CSV File Reading & Parsing
- Start by creating a new Process in TotalAgility Designer.
- Add a File System activity to your process canvas. Configure it to "Read Files" from your source network share:
- Enter the full UNC path (e.g.,
\\server\shared\csvs) for the source folder. - Set the file filter to
*.csvto target only CSV files.
- Enter the full UNC path (e.g.,
- Next, add a CSV Parser activity right after the File System step. Link the input to the file content from the previous activity.
- Map each column in your CSV to a new process variable (e.g.,
CustomerID,InvoiceAmount). Make sure variable names match the CSV column headers for easier mapping later. - Critical note: Ensure the TotalAgility service account has read permissions on the source network share—otherwise the process will fail to access the files.
- Map each column in your CSV to a new process variable (e.g.,
2. Prepare Your Word Template with Merge Fields
- Open your Word template and insert merge fields (via the "Mailings" tab in Word) that match the process variable names you created. For example, if you have a variable
CustomerName, the merge field should be«CustomerName». - Save the template to a location accessible to TotalAgility (either a local folder on the server or another network share—again, confirm the service account has read access here).
3. Populate the Word Template with CSV Data
- Add a Word Automation activity to your process. Configure it to "Open Template" and point to your prepared Word template file path.
- In the "Merge Fields" section of the Word Automation activity, map each process variable (from the CSV parse step) to the corresponding merge field in the template. Double-check that names are exact—typos will break the data population.
- Use the "Save Document" action in the Word Automation activity to save the populated Word file temporarily (you can use a process variable for the temp file path, like
C:\Temp\PopulatedDoc.docx).
4. Convert to PDF & Write to Target Share
- Add a Convert to PDF activity to the process. Link its input to the populated Word file path from the previous step. Configure the output path for the PDF (again, a temp path works here, or you can build a dynamic filename using variables, e.g.,
C:\Temp\«CustomerName»_Invoice.pdf). - Finally, add another File System activity set to "Write File". Point the target path to your destination network share (e.g.,
\\server\shared\completed_pdfs), and select the generated PDF file as the content to write. - Pro tip: Use dynamic filenames (incorporating variables like
InvoiceNumber) to avoid overwriting existing files in the target share.
Key Troubleshooting Tips
- Permissions: This is the #1 issue. Always verify the TotalAgility service account has read/write access to all network shares and file locations used in the process.
- CSV Encoding: If your CSV uses non-ASCII characters, set the CSV Parser activity’s encoding to match (e.g., UTF-8 or Windows-1252).
- Merge Field Validation: Before deploying, test the process with a sample CSV to ensure all merge fields are correctly populated—missing data usually means a variable-to-field name mismatch.
内容的提问来源于stack exchange,提问作者rockingmeister
相关产品推荐
相关产品推荐

