Skip to main content

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)

 

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.


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?


Is it always the first column?


Is it always the first column?

Yes, it is!


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