Hello,
I am currently working on a workflow where the input file needs to be updated more frequently. The challenge I'm facing is figuring out how to upload new data without modifying the workflow. Additionally, the new data needs to be mapped into a new tab in the output file. To help illustrate this, I've included two figures below.
Figure 1: Current Input file-
| Item | Color | Group | Amount |
| A | Green | I | 50 |
| D | Blue | II | 60 |
| B | Black | IIII | 75 |
| C | White | III | 80 |
Figure: Same input with new data (last two rows)
| Item | Color | Group | Amount |
| A | Green | I | 50 |
| D | Blue | II | 60 |
| B | Black | IIII | 75 |
| C | White | III | 80 |
| F | Orange | IIIII | 55 |
| G | Red | IV | 45 |
Now how can i add Item F, G into new tab in the existing output file.
So long as you have a defined output file, knowing its location, you can add new data or tabs into that file (provided the file is not open or in use by someone at that moment).
I would take you input data and join that back to the data from Tab 1, 2, 3, 4, etc using the Item field. You're doing this so that you can figure out if and what the new rows of data are. Once you have those, then you'll know if you need the new tab.
I would probably use a formula tool to identify the same original output file and then just write the records back to that file using a full filepath.name|||sheet replacement.
If the workflow still has the original excel file open (which is likely the case) then you can always write the entire file again as a copy, append the new tab, and then go back using Run Command to remove the original file. Alternatively, could probably use the BLOB tool here too.
I don’t think you need a macro though. I mean to say, you could, but I don’t think it’s necessary.
Hopefully this makes sense… -Jay
If your input file changes frequently and you don’t want to modify the workflow each time, the easiest option is to build a Batch Macro. The macro can read whatever new rows appear in the input and then route only the “new” items (F, G, etc.) into a separate output stream.
yes i agree and that's what i am looking for. can you please share workflow with batch macro that i can learn form.
thank you
I'm sorry I don't have the solution and not sure how to tag the one above that I think you were trying to get. @wirkKarl