Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: mlamHi Jagdev,
It sounds like we can do this without a loop.
1) Set up your Excel file node as per Adam's comment above BUT also include the following in the WorkbookSpec parameter on the Optional tab of the Excel file node.
<workbook>
<generatedFields>
<field type="filename" />
<field type="sheet" name="SheetInFile" />
<field type="row" name="RecordNumber"/>
</generatedFields>
</workbook>
Each of the .brd files listed in the Output field will also contain the filename, the name of the worksheet and the worksheet row number, enabling us to retain a lineage of the data.
2) Attach a "Multiple BRD files" node to the Excel file and put Output as the Filename parameter. This will read all the .brd file data together (i.e. no need to set up a loop). If the data on the worksheets differ, you can choose how to manage this using the ConcatenationMode parameter on the Optional tab.
3) To select only the data from rows 19 to 22 on each worksheet, you can use a Filter node to select records where "RecordNumber" field is between 19 and 22.
Example data flow (please copy the text into your BRE):
node:Multiple_BRD_Files
bretype:core::Multiple BRD Files
editor:sortkey=57d14f1c550901f9_2
input:@40fd2c7405e716f4/=Excel_File_2.48cf6cd2305e5f95
output:@40fd2c74028104af/=
prop:ConcatenationMode=union
prop:Filename=<<EOX
Output
EOX
editor:XY=580,80
end:Multiple_BRD_Files
node:Filter_3
bretype:core::Filter
editor:sortkey=57d1525b1d240f01
input:@40fd2c74167f1ca2/=Multiple_BRD_Files.40fd2c74028104af
output:@40fd2c7420761db6/=
prop:Script=<<EOX
emit *
where 'RecordNumber' >= 19 and 'RecordNumber' <= 22
EOX
editor:XY=670,80
end:Filter_3
node:Excel_File_2
bretype:core::Excel File
editor:sortkey=57d14f6e1030106a
output:@48cf6cd2305e5f95/metadata=
prop:File=C:\Users\mlam\Lavastorm\LAE Dev\Small examples\Multiple Excel worksheets\excel_multiple_sheets_02_cellA1.xlsx
prop:MetadataOutputPin=metadata
prop:UseSystemLocale=true
prop:WorkbookSpec=<<EOX
<workbook>
<generatedFields>
<field type="filename" />
<field type="sheet" name="SheetInFile" />
<field type="row" name="RecordNumber"/>
</generatedFields>
</workbook>
EOX
editor:XY=480,80
end:Excel_File_2
Michelle