Skip to main content
Solved

Write to multiple sheets to the same CSV file, but data is coming from 2 difference sources/streams.

  • 9 January 2023
  • 7 replies
  • 1473 views

As the title implies, I have a workspace where two different workflows have to write to the same CSV but different sheets. How do I go about doing that? I've attempted to use fme_feature_type as CSV File Name but that resulted into 2 separate CSV files as depicted by the image attached

 

Screenshot 2023-01-09 143608

Best answer by f.kemminje

copy the writer feature types. make it two.

and change the shaeetname. concatenate _1 or _2 (to the sheet name attribute )for the second sheet

image

View original
Did this help you find an answer to your question?

7 replies

dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • January 9, 2023

CSV does not support multiple sheets/tabs. Could you use XLS?


  • Author
  • January 9, 2023
dustin wrote:

CSV does not support multiple sheets/tabs. Could you use XLS?

Thanks for the information about CVS. I just tried an XLS writer but this time, the two streams simply combined instead of creating different sheets.


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Contributor
  • Best Answer
  • January 10, 2023

copy the writer feature types. make it two.

and change the shaeetname. concatenate _1 or _2 (to the sheet name attribute )for the second sheet

image


Forum|alt.badge.img+2
  • January 10, 2023

@Mario Federis​ or use dynamic workflows as described here


  • Author
  • January 10, 2023
markatsafe wrote:

@Mario Federis​ or use dynamic workflows as described here

@markatsafe  Are you referring to this subset of the article (https://community.safe.com/s/article/dynamic-workflows-destination-schema-derived-from). I think I understand the general concept of having the destination read schemas from multiple sources. But could you give an example of how writing multiple sheets into the same excel can be done?


  • Author
  • January 10, 2023
f.kemminje wrote:

copy the writer feature types. make it two.

and change the shaeetname. concatenate _1 or _2 (to the sheet name attribute )for the second sheet

image

Makes sense. But definitely not intuitive.


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Contributor
  • January 11, 2023
mfed_ai wrote:

Makes sense. But definitely not intuitive.

here is the sample workbench.


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