Skip to main content

Hello,

 

I would like to ask if it is possible in FME to configure it to always work with the first column or row without knowing its name (to use columns or rows based on their general order). I have many Excel files where columns and rows have different names. This way, I wouldn't have to rewrite everything each time.

 

Thank you very much for your help.

Not sure if I understand exactly what you need, but if you use the Generic reader, it returns col_1, col_2 etc instead of column names.


Not sure if I understand exactly what you need, but if you use the Generic reader, it returns col_1, col_2 etc instead of column names.

Let's say you have 3 Excel files, and the first column in each of them is named: ID, ExternalID, NumberID. Is it possible to instruct FME to always work with the first column without having to rename or modify the columns in FME? Is it possible to configure FME to always work with the first column in a generic manner, regardless of the column names?


Let's say you have 3 Excel files, and the first column in each of them is named: ID, ExternalID, NumberID. Is it possible to instruct FME to always work with the first column without having to rename or modify the columns in FME? Is it possible to configure FME to always work with the first column in a generic manner, regardless of the column names?

Yes, with the Generic (Feature)Reader combined with an xls or xlsx, you can.


Let's say you have 3 Excel files, and the first column in each of them is named: ID, ExternalID, NumberID. Is it possible to instruct FME to always work with the first column without having to rename or modify the columns in FME? Is it possible to configure FME to always work with the first column in a generic manner, regardless of the column names?

Could you please help me with the exact setup of the Feature Reader to achieve this? I am new to FME and still have a lot to learn. Thank you very much for your help.


Let's say you have 3 Excel files, and the first column in each of them is named: ID, ExternalID, NumberID. Is it possible to instruct FME to always work with the first column without having to rename or modify the columns in FME? Is it possible to configure FME to always work with the first column in a generic manner, regardless of the column names?

Sure 🙂

  • Creator to initiate process.
  • FeatureReader
    • Format = Generic (Any Format)
    • Dataset = your excel file
    • Output Ports = Single Output Port
  • Run workspace
  • Connect an AttributeExposer to the <Generic> outputport.
    • Choose Import --> From FeatureCache
    • Select all.
  • You probably want to remove your header from the data, this can be done using a Tester and xlsx_row_id = 1.
  • You probably need to rename the columns from col_1, col2, col3, etc to readable names, using an AttributeRenamer.

 


Let's say you have 3 Excel files, and the first column in each of them is named: ID, ExternalID, NumberID. Is it possible to instruct FME to always work with the first column without having to rename or modify the columns in FME? Is it possible to configure FME to always work with the first column in a generic manner, regardless of the column names?

Thank you


If you're just working with excel files you can just choose to skip the headers and start from line2

imageAttributes are then named A,B,C etc.


Reply