Skip to main content
Solved

excel worksheets


simonhume
Contributor
Forum|alt.badge.img+2

Good afternoon

Once again i find myself trying to do something relatively simple in FME and failing miserably. Frustrating doesn't come into it.

I have an excel spreadsheet with multiple worksheets, each one populated with planning data.

I would like to end up with one spreadsheet for each of the individual worksheets, so i can then use them for some other work with some spatial tables.

When i add the excel writer, i'm given the option of all the worksheets, which i select, then attach them to the corresponding reader. But the resulting output spreadsheet contains all the worksheets in one worksheet.

Have tried the fanout option to no avail.

Have tried adding the source spreadsheet as a a workspace resource, with all the worksheets selected, again, to no avail

I'm sure this is a simple thing to do in FME, but it's currently beyond me. Any advice would be gratefully appreciated

regards

Simon Hume

Best answer by redgeographics

Assuming the worksheets all use the same column structure:

Add an Excel reader, set it to 'Single Merged Feature Type', then use an AttributeExposer to expose the fme_feature_type attribute. This is the name of the worksheet. Connect it to a writer.

Then in the Navigator panel, set a Fanout expression. This handles the output file name.

By setting it to @Value(fme_feature_type).xlsx you'll get a seperate Excel file for each worksheet in the original file.

Hope this helps.

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

4 replies

ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • July 28, 2017

You need to use the fanout in the navigator panel, not the fanout within the writer if you want one separate excel file for each sheet


redgeographics
Celebrity
Forum|alt.badge.img+49
  • Celebrity
  • Best Answer
  • July 28, 2017

Assuming the worksheets all use the same column structure:

Add an Excel reader, set it to 'Single Merged Feature Type', then use an AttributeExposer to expose the fme_feature_type attribute. This is the name of the worksheet. Connect it to a writer.

Then in the Navigator panel, set a Fanout expression. This handles the output file name.

By setting it to @Value(fme_feature_type).xlsx you'll get a seperate Excel file for each worksheet in the original file.

Hope this helps.


simonhume
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • July 28, 2017

Hi

thanks for your answer

I've tried this, but still get the single spreadsheet being produced with all the original worksheets in one


redgeographics
Celebrity
Forum|alt.badge.img+49

Can you output to the Data Inspector and doublecheck the fme_feature_type?


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