Skip to main content
Question

Excel Writer - Leveraging Existing Template with Formulas.


aashnaparikh
Contributor
Forum|alt.badge.img+1

Context : The reader file has 14 attributes ( No formulas ) and the format is Excel File. For the writer file, I am trying to leverage an existing template file (with 2 sheets - Standard & Limits) and the final output should be written to the Standard sheet of the template file. 

The template file has 80 attributes in total.  The value for some attributes are based on the value from the reader attributes, some attributes are hardcoded in the template itself and the remaining attributes will be populated based on the formulas from the existing sheet i.e Standard and the Limit Sheet. 

What is the ideal approach to achieve the result ensuring no formulas are overwritten in the template file - standard sheet in the process and that my final writer output has the exact same sheets ?

2 replies

crutledge
Enthusiast
Forum|alt.badge.img+30
  • Enthusiast
  • April 28, 2025

Hi ​@aashnaparikh 

If I understand correctly it is important to note that when using a template the template itself will not be overwritten. No changes will happen to the original template file that you identify in the excel written. 

Formulas can be a bit tricky though. See the formulas portion in the following link. 

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-ReadersWriters/xlsx/XLSX_writer.htm

 

Hope that helps!


takashi
Influencer
  • April 29, 2025

Hi ​@aashnaparikh ,

Maybe what you are looking for might be the Row Number Attribute parameter in the Excel writer feature type.

  1. For every feature, keep only attributes to overwrite into the destination sheet.
  2. Use Counter to create a new attribute storing destination row number to each row.
  3. Set the attribute to the Row Number Attribute parameter in the writer feature type.

Assuming that fields called “a” and “b” in the destination sheet should be overwritten (i.e. other fields should not be overwritten), the setting looks like this.

 


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