Solved

Extract Excel schema automatically

  • 19 February 2018
  • 3 replies
  • 12 views

Badge +8

Hello,

Is there a way to extract the schema automatically from an Excel file when FME Server runs the scheduled workbench?

People who drops the Excel files doesn't change the fields though, only the sheet name.

Thanks.

icon

Best answer by david_r 19 February 2018, 18:13

View original

3 replies

Userlevel 5

If you use the FeatureReader rather than the reguler Excel reader, you'll get the schema feature as well as the data features. If you use a single output port, you'll be able to read any Excel file. And since the schema feature comes before the data features, you can analyze the structure of your Excel file before working on the data, e.g. verify the existence of certain fields etc.

Just remember that you'll have to manually expose the attributes in your workspace when using the single output port.

Badge +8

It works great! I can't retrieve the fme_basename though. Even with the AttributeExposer. Is there another way?

Userlevel 4
Badge +13

It works great! I can't retrieve the fme_basename though. Even with the AttributeExposer. Is there another way?

Hi @philippeb,

 

You will have to expose it in the excel readers parameters - you might still also need the AttributeExposer

 

Reply