Skip to main content

I’ve got an FME workbench that picks up 2 seperate SQL tables in the two readers and the data is sorted and the filtered. It then needs to be output to an Excel template containing 2 tab sheets and save the data from each SQL table onto the separate sheets.

Test copy of workbench looks like this:

This first attempt only outputted the data from the first reader onto both tab sheets in excel.

Then did this:

So this did pick up both readers but instead of saving the one excel template with the data outputted to both tab sheets, it created to excel files with the data being populated on the tab sheet.

Essentially I want to pick up both sql readers, sort them and filter them and then output to the excel template but the data gets saved onto sheet 1 and sheet 2 for example for each reader and then save the one excel file to the drive location!

Am I missing a step or should i be using different transformations, etc?

Appreciate any suggestions?
 

Set it up as your bottom screen shot. add an excel writer to use for one stream. then copy and past the same excel writer. in the parameter you can then name the tabs as you want. :)

when you add a writer the tab name is usually “Sheet1” as default. then when you copy  and paste the writer the new tab is usually defaulted to “sheet100”. 

 

 

 

 


You can use attribute values or parameters in the sheet name for the excel writer. Used to be called a fanout, but you can do this to write features to multiple places using same writer.

After each SQL reader, add an AttributeCreator, make an attribute that is the output sheet name for that table, and then set the writer’s sheet name to be that attribute.

 


Reply