Skip to main content
Question

Hi everyone. I am very new to FME. I am trying to copy data from one excel file to another but the new file is formatted differently

  • November 8, 2020
  • 3 replies
  • 47 views

Below is the example file where I am getting all my data from. As you can see, each row has a unique ID and there are 4 sets of product information.Example1What I am trying to do is create a single row for each set of product and ensure that the ID and User ID matches. Example below Example 2Any help will be greatly appreciated. Thank you

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

Forum|alt.badge.img+2
  • November 9, 2020

@francoconv​ Welcome to the FME community.

Possibly the easiest approach is to attached 4 AttributeManager transformers (in parallel not in series) to your Excel reader Feature Type, and then rename each of the attributes. i.e.

Product Item 1 -> Product Item

Product Description 1 -> Product Description .

There is also a BulkAttributeRenamer that will let you remove a Suffix. So again, attach four BulkAttributeRenamer transformers )in parallel) and remove the suffix " 1" etc.


  • Author
  • November 9, 2020

@francoconv​ Welcome to the FME community.

Possibly the easiest approach is to attached 4 AttributeManager transformers (in parallel not in series) to your Excel reader Feature Type, and then rename each of the attributes. i.e.

Product Item 1 -> Product Item

Product Description 1 -> Product Description .

There is also a BulkAttributeRenamer that will let you remove a Suffix. So again, attach four BulkAttributeRenamer transformers )in parallel) and remove the suffix " 1" etc.

Thanks so much for this. Will give it a go and report back.

The excel file that I will end up using has 51 sets of product information. Is there another option other than then using 51 AttributeManager transformers?


Forum|alt.badge.img+2
  • November 10, 2020

@francoconv​ It's easier to explain these things if you can include sample data. But if you know how many products you have, then you can use the Cloner to create a separate feature for each 'product' and then feed all of those into a BulkAttributeRenamer, and parameterize the suffix to remove (i.e the value of the suffix can come from an attribute.