Question

Write output in multiple sheets in single Excel

  • 9 August 2018
  • 4 replies
  • 10 views

Badge +1

Hi.

I have multiple excels as input. I am carrying out the summary from StatisticCalculator and writing the output in excel itself using batch mode. The output is Output_<input file name>. The number of input files is the same as the number of the output file.

 

Now, what I want is to get output in one single excel in multiple sheets(tabs) with sheet name as Output_<input file name>. Will the same thing work with Batch mode?

 

What I already tried is to use the sheet name as the reader parameter but the output is not as desired. Also, I tried FileNamePartExtractor, the attributes are blank. Any solutions?


4 replies

Userlevel 2
Badge +17
What is the "batch mode" in your context?

 

 

Badge +1
What is the "batch mode" in your context?

 

 

Thanks @takashi for looking into it. I've attached one simple example that I have used in this case.batch.zip
Userlevel 2
Badge +17

An easy way is, expose "fme_basename" (source file name without extension) in the CSV reader feature type, set the "fme_basename" and "STATUS" to the Group By parameter in the StatisticsCalculator, and set "fme_basename" to the destination feature type name (Sheet Name) in the Excel writer feature type. The solution is generic, regardless of whether the workspace will be run via batch command.

Badge +1

An easy way is, expose "fme_basename" (source file name without extension) in the CSV reader feature type, set the "fme_basename" and "STATUS" to the Group By parameter in the StatisticsCalculator, and set "fme_basename" to the destination feature type name (Sheet Name) in the Excel writer feature type. The solution is generic, regardless of whether the workspace will be run via batch command.

Commendable!

 

Reply