- page_1
- page_2
- page_3
- page_4
But the Excel document that gets generated has the order:
- page_2
- page_1
- page_3
- page_4
Thanks
- page_1
- page_2
- page_3
- page_4
But the Excel document that gets generated has the order:
- page_2
- page_1
- page_3
- page_4
Thanks
You can control the order of worksheets specifying Sheet Order parameter for each writer feature type (Format Parameters), in FME 2014 (I confirmed with FME 2014 SP2).
Takashi
I solved this problem by making workspace runners for each of the four worksheets in the XLS. Fortunately my application is also writing to a CSV file, so the first runner executes that, and then the next four runners read from the CSV at a specified begin / length of the CSV. I specified "Yes" for "Wait for Job to Complete". Each runner opens the XLS, writes to a particular worksheet, and then closes it. That allows me to control the order of the worksheets.
The problem is the fourth worksheet which typically has only about 3,000 rows. I would guess that FME writes that fourth worksheet before it writes the third worksheet, so the worksheets line up as page_1, page_2, page_4, page_3.
I even used a feature holder so the worksheets would write in order, but that didn't have any effect. The only technique that worked is using workspace runners as above.
How about sorting the records before testing?
- Having multiple writers for the Excel and ordering them visually in the navigation pane
- Sorting the counter before writing to Excel
Between the two of these, it finally worked. My Excel displays Page_1, Page_2, Page_3, Page_4.
Thanks guys.
You gave me hint I needed. I had already selected No for Drop Existing Sheet and Yes for Truncate Existing Sheet, but now I changed to specifying a template file and removed the Sheet Order parameter altogether, which did the trick.
Steinar