Skip to main content
Solved

Extract Excel schema automatically

  • February 19, 2018
  • 3 replies
  • 87 views

philippeb
Enthusiast
Forum|alt.badge.img+18

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.

Best answer by david_r

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.

View original
Did this help you find an answer to your question?

3 replies

david_r
Evangelist
  • Best Answer
  • February 19, 2018

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.


philippeb
Enthusiast
Forum|alt.badge.img+18
  • Author
  • Enthusiast
  • February 19, 2018

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


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 20, 2018
philippeb wrote:

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

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings