Hi Everyone,
I have written iterative Macro that's being called after reading a data base for each row. I want to be able to write output of each iteration in a single file in append mode. however, each iteration overwrites the output data file. How do i append output of each iteration in a single file?
Solved! Go to Solution.
You might try these steps:
@sidatm You can use the Union Tool to bring them together before sending to the Output Data Tool, like so:
Thanks. This works however i had to create blank file dynamically. Can i create this file on the dynamically?
You can use the Formula Tool to dynamically generate the file name (or preferably, the absolute UNC path to avoid errors/confusion) - that is, if you don't already have the desired file name/path from some other source:
For the output, you can configure the Output Data Tool to use the file name/path that you specify:
And for reading a file with a dynamic name, you can use the Dynamic Input Tool:
Sorry i was not clear in my question. The original solution that you provided, when we execute the workflow, Input data already expects that a file exists so i have to create a file manually before executing the workflow. Can workflow itself create a blank file with header? please see Yellow highlighted in the screenshot.