Skip to main content

Hi All,

 

How can I force FME to write a single excel file with an unique DateTime value for all the Excel sheets included in a FeatureWriter? see the details below:

image 

Atm FeatureWriter writes a 'datetime' per excel sheet therefore export multiple xlsx instead of one single excel file.

 

Any ideas? 🙂

 

 

 

 

When I need this, I create a Scripted Parameter. (Navigator, User Parameters)

This works:

import datetime
 
timestamp = datetime.datetime.now().strftime("%H_%M_%S")
return timestamp

 


Bravo! thanks @nielsgerrits​ :)


Bravo! thanks @nielsgerrits​ :)

To elaborate on @nielsgerrits​ answer: the @DateTimeNow() function gets evaluated per feature, so each feature will have a slightly different timestamp. Despite rounding it to seconds you'll still potentially get multiple values


Reply