Skip to main content
Question

How to put columns in Excel output in another order?


Hmm, I am struggling with this for a day now and I tried the tutorials, but it seems I am doing something wrong.

So, basically I have an xml file out of which I want to put certain elements into an Excel output. But here is the issue.

I want those outputs in a certain order - and no matter what I do, FME will always write the columns into alphabetical order. Which just will not do for this application.

 

The transformation is a simple one:

transformation 

But somehow I always end up with the same output.

As You can see, I already renamed the attributes with the numbers, trying to sort it that way, but no matter what I do, the output then looks like this:

output(Also with those weird widths for those columns)

 

Can this be somehow changed?

 

Thanks so much in advance.

9 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

Can you post a screenshot of the User Attributes part of the feature type properties?


  • Author
  • July 17, 2023

Sure! This is what it looks right now:

 

Reader

input 

Writer:

image


  • Author
  • July 17, 2023
redgeographics wrote:

Can you post a screenshot of the User Attributes part of the feature type properties?

Sure.

 

Reader:

image 

Writer:

image


redgeographics
Celebrity
Forum|alt.badge.img+49
alex_rump wrote:

Sure! This is what it looks right now:

 

Reader

input 

Writer:

image

Switch it (on the writer) from Automatic to Manual. Depending on what you're doing in the AttributeManager you may have to map the attributes though.


  • Author
  • July 17, 2023
redgeographics wrote:

Switch it (on the writer) from Automatic to Manual. Depending on what you're doing in the AttributeManager you may have to map the attributes though.

Thanks I will try that.

 

 

Okay, uhm, now it is throwing me this error:

image


redgeographics
Celebrity
Forum|alt.badge.img+49
redgeographics wrote:

Switch it (on the writer) from Automatic to Manual. Depending on what you're doing in the AttributeManager you may have to map the attributes though.

Check if the parameter 'Use Attribute Names as Column Position" is set to yes. It should be no.


  • Author
  • July 17, 2023
redgeographics wrote:

Switch it (on the writer) from Automatic to Manual. Depending on what you're doing in the AttributeManager you may have to map the attributes though.

It runs through now, but somehow it still writes the columns into the wrong order. :( This is what my parameters look like right now:

image


redgeographics
Celebrity
Forum|alt.badge.img+49
redgeographics wrote:

Switch it (on the writer) from Automatic to Manual. Depending on what you're doing in the AttributeManager you may have to map the attributes though.

I've you've written before and are not overwriting the file (check the Navigator) then that is indeed what will happen.

 

So try removing the file and run again (and consider whether you need to write a new file every time the workspace runs or append to an existing file)


  • Author
  • July 17, 2023
redgeographics wrote:

Switch it (on the writer) from Automatic to Manual. Depending on what you're doing in the AttributeManager you may have to map the attributes though.

Ah, thank you. I have overseen that. Thanks!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings