Solved

excel worksheets

  • 28 July 2017
  • 4 replies
  • 30 views

Badge +1

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

icon

Best answer by redgeographics 28 July 2017, 16:21

View original

4 replies

Userlevel 1
Badge +21

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

Userlevel 5
Badge +26

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.

Badge +1

Hi

thanks for your answer

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

Userlevel 5
Badge +26

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

Reply