Skip to main content

Hi everyone,

 

I am new to FME, please help me with the following issue. I am reading an excel file using FME. The name of the attributes (columns) is not right, and its in row 5 of the file. I was wondering how I can assign values in that row (5) as attribute names. I know that I can use a tool like AttributeManager to rename the attributes, but its too many attributes/columns (>100). I need a way that could assign the values from row to attribute name.

Thanks

When you add the reader, you'll be presented with a window like:

imageselect your dataset then click parameters, and in the Sheets to Read box (at the top) you'll see there is an option to specify what row the field names are in and what row the data starts inimage.pngIn your case, Field Names Row will be 5 and Cell Range will be 6:


When you add the reader, you'll be presented with a window like:

imageselect your dataset then click parameters, and in the Sheets to Read box (at the top) you'll see there is an option to specify what row the field names are in and what row the data starts inimage.pngIn your case, Field Names Row will be 5 and Cell Range will be 6:

Many thanks for your help.

Actually, I created that row (5) after reading the data and aggregating two rows. So, row 5 was not in my original data, It has been created after reading the data and doing some data preparation. Now, I want to assign it to filed names.


Many thanks for your help.

Actually, I created that row (5) after reading the data and aggregating two rows. So, row 5 was not in my original data, It has been created after reading the data and doing some data preparation. Now, I want to assign it to filed names.

Without knowing the exact data, and what you're wanting to achieve with the wider process, its difficult to give an absolute answer.

 

Basically your going to be dynamically renaming your attributes, and this is going to mean they're not going to be exposed in FME. You can still write them out using a schema feature but dealing with them in workbench becomes a bit more difficult.

 

There's some details on schema features and dynamic workflows here:

http://docs.safe.com/fme/2017.1/html/FME_Desktop_Documentation/FME_Workbench/Workbench/Understanding_Schema.htm

https://community.safe.com/s/article/dynamic-workflows-advanced-example-modifying-the-s

http://docs.safe.com/fme/2017.1/html/FME_Desktop_Documentation/FME_Workbench/Workbench/Deriving-Destination-Schema-from-Schema-Feature.htm


Reply