Skip to main content
Question

How to select first worksheet by default excelreader


Forum|alt.badge.img

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

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • October 23, 2019

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


sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • October 23, 2019

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

 


sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • October 23, 2019

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


Forum|alt.badge.img
  • Author
  • October 24, 2019

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


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