Have used a feature merger to merge several excel lists together and want to output them to a single excel worksheet. I've got it working fine except when I run a sorter before the writer, and sort numerically off of one of my numeric fields, the writer will add and additional page to the excel file and put information from one list on the actual intended sheet and information from the other on the additional sheet (if I use an inspector and view the list in Data Inspector it's perfect). If I sort on the exact same field, but do it alphabetically, it puts everything on the single sheet I specify (but of course is not sorted the way I'd like). Any ideas?
The field seems to be a character field in the source.
If you add an ExpressionEvaluator before the Sorter (expression Field * 1) it will force the Field to be numeric. That should allow the numeric sort without the issue.
Checked both input fields, both are numeric. Did add ExpressionEvaluator as suggested, to no avail.
Here is the feature Type parameters for the Excel Writer
writerparameters.gif
Starting on the left, I am merging video channel and data channels for multiple cable systems, forming an "all active channels form all cable systems" list.
At FeatureMerger_3, I'm adding in a Lower Edge attribute which is what I will sort by. The reader for "DSON...nels" shows Lower Edge as a number.
At FeatureMerger, I'm adding in vacant channels (so lets say I have 100 channels that I can have content on, but only have 75 active channels, I want to show the other 25 vacant slots). So DS750 is a list of all possible channels and also has a Lower Edge field (also numeric in the reader). So I'm keeping all of the active channels (Merged) and adding in the vacants (Unused Supplier).
Then I try to sort by Lower Edge. If I sort numerically, my output is split onto 2 pages with all of my original active channels on one page, and all of my vacant channels on another, both sorted correctly, numerically. If I sort alphabetically, everything shows up on one page, as I'd like it to, but of course it's sorted alphabetically, which I don't want.
In the attached Excel screenshots, the active channels are colored orange and the vacants are red a green. As you can see, FME is adding an extra page when sorted numerically.
As suggested by another answer, I did try adding an ExpressionEvaluator previous to the sorter and multiplying Lower Edge by 1. Did not work.workflow-part-a.gif workflow-part-b.gif numeric-a.gif numeric-b.gif alphabetic.gif
Here is the feature Type parameters for the Excel Writer
writerparameters.gif
If you want to write every feature always into the same worksheet named "Covington", you can just set the literal "Covington" to the Sheet Name parameter, rather than setting the attribute "ChannelMap".
Here is the feature Type parameters for the Excel Writer
writerparameters.gif
Have you changed the "Comparison Mode" too in the FeatureMerger according to the sorting mode setting (Alpha/Num) in the Sorter?
@takashi
Changing the page name to "Covington" rather than using the ChannelMap attribute did the trick. Totally makes sense now. My Vacant list (DS750) does not contain the "ChannelMap" field, as I'll need to use it for the other systems as well. Although, I guess I'm curious as to why sorting the Lower Edge attribute alphabetically would put everything on one page - I would expect that it would still use 2 pages. At any rate it seems to work perfectly now. Appreciate the input.
@takashi
Changing the page name to "Covington" rather than using the ChannelMap attribute did the trick. Totally makes sense now. My Vacant list (DS750) does not contain the "ChannelMap" field, as I'll need to use it for the other systems as well. Although, I guess I'm curious as to why sorting the Lower Edge attribute alphabetically would put everything on one page - I would expect that it would still use 2 pages. At any rate it seems to work perfectly now. Appreciate the input.
When you sorted them with alphabetic mode, the 41 features still were output via the UnusedSupplier port of the FeatureMerger?