Solved

Change output excel sheet (or file name) based on attribute name

  • 27 November 2018
  • 7 replies
  • 30 views

I'm sorry if this has been answered before but I couldn't find the exact answer to my question which is:

How do I change the output name of an excel sheet (or file) based on a specific attribute name.

 

Example:

I need my output sheet name to be "Namn" and automatically read from the attribute name since I have multiple similar datasets but with variations on "Namn". All of which should be put into a separeate sheet but in the same file.

It is probably really simple but as I said, I couldn't find it.

(For me the output parameters and schemas are real confusing)

 

icon

Best answer by debbiatsafe 28 November 2018, 22:14

View original

7 replies

Userlevel 3
Badge +17

Hi @majkiboy

You would want to use a feature type fanout. You can set this in the Excel writer feature type dialog. This article also contains instructions on how to fanout in FME.

I hope this helps.

Userlevel 1
Badge +10

Hi @majkiboy

You would want to use a feature type fanout. You can set this in the Excel writer feature type dialog. This article also contains instructions on how to fanout in FME.

I hope this helps.

I think they want the sheet name to be called Namn (or the other variations of this), rather than the value of Namn.

Hi @majkiboy

You would want to use a feature type fanout. You can set this in the Excel writer feature type dialog. This article also contains instructions on how to fanout in FME.

I hope this helps.

I'm not sure it helps. The first sentence in the link you sent says: "A fanout is a way within FME to split output data based upon the value of an attribute. " I don't need the value of the attribute, I need the name. Or am I missing something obvious?

I need something simple like "@column_1_attribute_name" to put into the "sheet name" box. Is there something like this?

Userlevel 1
Badge +10

Is it always the first column?

Is it always the first column?

Yes, it is!

Userlevel 3
Badge +17

I'm not sure it helps. The first sentence in the link you sent says: "A fanout is a way within FME to split output data based upon the value of an attribute. " I don't need the value of the attribute, I need the name. Or am I missing something obvious?

I need something simple like "@column_1_attribute_name" to put into the "sheet name" box. Is there something like this?

Hi @majkiboy

My apologies for misreading your question.

Attached is a workspace which uses the Schema reader to get the attribute names of the input Excel file, Tester to get the first attribute name, and a FeatureJoiner to join the attribute name onto the input Excel features.

I hope this helps.

GetAttributeName_QA.fmwt

Hi @majkiboy

My apologies for misreading your question.

Attached is a workspace which uses the Schema reader to get the attribute names of the input Excel file, Tester to get the first attribute name, and a FeatureJoiner to join the attribute name onto the input Excel features.

I hope this helps.

GetAttributeName_QA.fmwt

Thank you very much! I still kind of don't understand this, but at least I can see it working. I have to study what you actually did in your workspace!

Reply