Question

Using fanout to export to excel tabs

  • 28 January 2020
  • 5 replies
  • 37 views

Badge

Hello,

 

 

I want to create an excel file for each customer, within each file, you can find information regarding this customer. I use therefore the fanout option in the writer.

However, I have two tabs that I want to change in Excel, so I tried using 2 writers (one for each tabs), with the same name output name on the same location but fme does not seem to be able to see that these tabs need to be merged in 1 file (th name I put in the fanout). This results in 2 files in the output, and because they have the same name, one file is not exported as Excel.

 

Is there a possibility in fme to export two multiple tabs, when using fanout?

5 replies

Userlevel 4
Badge +25

Yes, you only need to use one writer and then in the output feature type set the sheet name to something dynamic, i.e. an attribute containing the customer name.

Userlevel 2
Badge +12

The Fanout for sheets should be in the feature type, not the writer:

When you replace the Sheet1 in the image by the value of the attribute that contains the customer name (use the down arrow to select), it will work as a Fanout and create a tab per customer.

Hope this helps.

Badge

Yes, you only need to use one writer and then in the output feature type set the sheet name to something dynamic, i.e. an attribute containing the customer name.

It does not seem to work if I want multiple excel files (one for each customer), but within each file two tabs (one based on a French template file and one based on an English template, filled with values of the customer), because it will export to only one tab!

I try to work on it a bit more.

 

 

 

 

Userlevel 4
Badge +25
It does not seem to work if I want multiple excel files (one for each customer), but within each file two tabs (one based on a French template file and one based on an English template, filled with values of the customer), because it will export to only one tab!

I try to work on it a bit more.

 

 

 

 

If you want to write multiple Excel files you'll need to check the Fanout settings on the writer, that can be done in the Navigator panel. Note you'll still only need one writer.

Badge
Does it also works when I have to write different data in the different tabs?

- Tab A: on position E40 I need to write the name of the organisation (I can do that by changing the start column and row in the feature type)

- Tab B: on position E40 i need to write the name of the organisation in the other language

- Tab C: I need to paste all the information I have on the organisation (just the table that comes out of fme is fine)

 

They all three have a different layout, so if I insert the template, I only can use one template sheet.

I already checked the fanout option (based on the name) in the writer

split the data in three branches (each for each tabs), made an extra attribute (name of the sheet) so the correct info is placed in the right sheet (based on this attribute), and then merged them back together.

It does not seem to work; nothing is written into the document.

 

 

 

Reply