Skip to main content
Question

Excel Writer: Output Field Names in Columns instead of Rows

  • 11 December 2024
  • 1 reply
  • 16 views

boxcase01
Participant
Forum|alt.badge.img+1

Hi,

 

I’m using FME 2024.1.

I want to write xls files out where my field names appear in Column A (with their corresponding value pair in Column B) instead of in rows. Sounds simple, right?!

Writing the data out with an Excel Writer produces a default output like this:

Field Names in Row 1, values in the corresponding column.

...this doesn’t make for a particularly human-readable output when you have 250+ fields in the output dataset.

This is the style I would like the output to be in:

Field Names in Column A with matching values in Column B.


I have tried using an AttributeExploder to create name:value pairs but am having trouble getting from there to anything particularly useable (I still have a lot to learn about working with lists).

 

Oh, great hive mind, please help me out!

 

Thanks,

 

Casey

 

1 reply

j.botterill
Influencer
Forum|alt.badge.img+32
  • Influencer
  • December 11, 2024

Hi there, you have a few options. 

Start out reading over this article https://support.safe.com/hc/en-us/articles/25407761369741-Transpose-a-Table-Using-FME\

Custom transformer AttributeTranposer transposes attributes so that the value of a selected Column Attribute is turned into a new attribute. In other words, it's a simple version of the AttributePivoter that flips the "rows" and "columns" of a feature attribute table


Reply


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