Skip to main content
Solved

Extract Excel schema automatically

  • February 19, 2018
  • 3 replies
  • 113 views

philippeb
Enthusiast
Forum|alt.badge.img+22

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • 8394 replies
  • 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+22
  • Author
  • Enthusiast
  • 329 replies
  • February 19, 2018

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


fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • February 20, 2018

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