Hello!
I have a workbench in FME Desktop 2021.2 where I need to write out several XLSX files from the same dataset, with exactly 1500 rows in each, and each one named FileName_1.xlsx, FileName_2.xlsx, FileName_3.xlsx, etc.
I have managed to do this using a Counter, and ExpressionEvaluator. The ExpressionEvaluator takes the attribute from Counter (_count) and creates a new attribute called "_result" using this expression:
@floor(@Value(_count)/1500) + 1
So that gives me the sequential file numbers that I want to append to the file names based on 1500 rows in each one.
I can do this if I include the "result" attribute in the Excel writer, and use a FanOut Expression like this:
FileName_@Value(result).xlsx
This produces the Excel files with the correct file names, with 1500 rows per file.
However, my question is, how can I exclude this "result" attribute in the Excel files? I don't want that attribute being written out. If I remove it, there is then no attribute for the Fanout expression to operate on.
I thought about putting this "result" value in a variable, but I cannot seem to access this variable in the FanOut Expression. Any help would be appreciated.
Thanks