Skip to main content
Question

Write output in multiple sheets in single Excel


parashari
Forum|alt.badge.img+2

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

takashi
Supporter
  • August 9, 2018
What is the "batch mode" in your context?

 

 


parashari
Forum|alt.badge.img+2
  • Author
  • August 9, 2018
takashi wrote:
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

takashi
Supporter
  • August 9, 2018

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.


parashari
Forum|alt.badge.img+2
  • Author
  • August 9, 2018
takashi wrote:

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


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