Skip to main content
Question

Dynamic writer: Excel column reordering to alphabetical

  • January 16, 2026
  • 4 replies
  • 103 views

caromc
Contributor
Forum|alt.badge.img+2

I have written a workbench were user can upload a excel spreadsheet and the workbench will convert the coordinates in the spreadsheet to a variety of different coordinate systems.
The last step is a dynamic(excel) writer which works perfectly if I give the new coordinate attribute (column) a generic name (new_X and new_Y).
I introduced a bulk attribute renamer to add a suffix reflecting the new coordinate system ( for example: X_WGS84 and Y_WGS84) which makes the output more intuitive and will avoid any confusion.

When I do this the dynamic reader changes the order of the output columns to alphabetical.
All the spreadsheets are different, so I don't think I can use a template.
Is there an easy way to achieve this?

4 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • January 16, 2026

How are you setting the dynamic schema definition in the writer?


caromc
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • January 19, 2026

Morning, thanks for you help.

I am setting the dynamic schema defintion to Schema from Schema feature.


evieatsafe
Safer
  • Safer
  • February 3, 2026

Hi ​@caromc I don’t believe I understand what the error you are getting with the Excel writer but I’ll try my best to provide some suggestions about the sorting issue.

  • Are you writing to a new excel sheet each time or are you updating excel sheets? If you are writing to existing excel sheets and updating them the attribute/columns order should remain.
  • If these are new files with a desired sorting of attributes/columns there’s a few solutions, such as manipulating the schema feature with the list transformers. 
  • I believe that by having a dynamic reader or generic reader it does not preserver the order of the attributes, others have faced a similar issue
  • Are you using any other attribute related transformers before writing?
  • what is your desired outcome/schema sorting?
  • what errors or inconsistencies are you encountering in your output? (Besides the sorting of the columns)

caromc
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 3, 2026

Thanks Evie. 

I am writing to a new excel spreadsheet each time. 

The workflow is that the user uploads their spreadsheet to FME Server , completes some user parameters ( ie new projection required) then the workbench runs and provides the user with a link to download a new spreadsheet with the coordinates as two new coordinate columns on the end.

I am using an excel reader ( not a generic reader ) but thanks heaps for the link I wil have a read as this may offer a solution.  

I am using an attribute manager earlier in the work bench, but the issue seems only to be present when I add the Bulk Attribute renamer to add a suffix to the column name.

There are no other errors and the workbench runs really well if I have a dynamic writer with the new coordinate columns as a generic user attribute, say X_new & Y_new . It is only the sorting of the columns to alphabetical after I rename them with the bulk attribute renamer and write using a dynamic writer that is the issue. 

I am fairly new to FME and have not tried manipulating the schema feature with the list transformers and not quite sure how to do this. 

Thank again for the reply.