Question

How to select first worksheet by default excelreader

  • 23 October 2019
  • 4 replies
  • 7 views

Badge

Hi fme guys ;-)

 

 

I have to create an export tool that will have as reader an excel file...

 

The problem is that the worksheet used won't have the same name everytime...

 

 

The structure will remain the same... It's only the name of the worksheet that changes...

 

 

My question is, how could I handle this problem...

 

Thanks for you help...


4 replies

Userlevel 1
Badge +10

Do you have multiple worksheets in each file and you want to read only the first sheet? Or multiple worksheets with different sheet names but only one sheet

Badge +21

Use the FeatureReader and the Generic port should work? Kick it off with a Creator before the FeatureReader

 

Badge +21

Or use the FeatureReader to get the Schema - use a Sampler to only get the first schema, the first sheet, and then use the FeatureReader_2 to read only that sheet selecting the fme_feature_type_name (or another attribute which contains the sheet name) as input

Badge

Thanks for you help guys ...

 

 

I used the "2 FeatureReader" method:

 

 

I the first one I set the Excel file to the prompted parameter:

 

 

this one will be set further in the project by webinterface (FME Server)

 

the second Reader is the same with the feature type to read set to fme_feature_type_name

 

And at the end I expose the parameter with the attributes from one excel...

 

Have a nice day (you made mine :) )

 

Reply