Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: aopIf the structure in your 4 excel files is similar then you can take all the data in in one excel node (I guess this is how you've done it already).
To help things later on you could specify a custom workbook spec in the excel node to generate a field containing the source file nime in a field in the output. So in its simplest form you could put this as the value for WorkbookSpec parameter:
<workbook>
<generatedFields>
<field type="filename" />
</generatedFields>
</workbook>
As next step you would have your processing logic in LAE. I understood you would just like to process the data and create separate outputs for the processed data based on the filename the row originated from. Idea so far was to handle the data from the four source files as one data set (no need to loop the processing logic). This was made possible by including the source file name in the data so we can separate the data sets in the reporting phase.
When it comes to the reporting side you have at least these options depending on your scenario:
1) If you will always have the same number of files with same names then you could just create a filter in the end of the chain with multiple outputs and have four output nodes after that. Filter criteria would be based on the filename field you have in your data now.
2) If you wil always have the same number of files but names can differ then you could again use a filter but as the file names would vary the filter criteria could be based on mapping a source file name to a number (e.g. first unique filename in filename field to 1 and the last to 4) and and then creating a filter with four outputs using the numbering as filter criteria.
3) If you will have a varying number of source files you would need a loop construction. Search for IterationExample.brg for loop examples (should be a part your LAE installation).
4) As a good alternative to the loop structure you could use Execute BRX node that can also be used to loop a certain processing logic but is a different approach from the loop node. If you would want to have output file naming to be based on the source file names (and the file names differ from time to time) or some other dynamic factor this approach would allow also that. However, figuring out the first time how this node is set up could take a while...