Skip to main content

I'm creating a new excel file nightly and some nights there will be no data to populate the excel file, but I need the file to be created anyways. Is there a step in the Excel writer that I'm missing to do this?

FME will create a file when the first feature is written. So when no features are written, no file will be created. I see two ways of bypassing this issue:

- Always create an empty record by writing a feature with no values (but that leave you with a XLS file with an empty line, even if data is written).

- Use the option not to write Filed Names first and create (using Creator and AttributeCreator) a feature with the field names as the first feature to write. That will create the file using the field names as first line.

Hope this is useful.


FME will create a file when the first feature is written. So when no features are written, no file will be created. I see two ways of bypassing this issue:

- Always create an empty record by writing a feature with no values (but that leave you with a XLS file with an empty line, even if data is written).

- Use the option not to write Filed Names first and create (using Creator and AttributeCreator) a feature with the field names as the first feature to write. That will create the file using the field names as first line.

Hope this is useful.

This answer helped me in the right direction! All I did is only add the Creator transformer (and not the attributeCreator) and that is enough for the excel file to create at least the column headers if there is no data. Thanks!


This answer helped me in the right direction! All I did is only add the Creator transformer (and not the attributeCreator) and that is enough for the excel file to create at least the column headers if there is no data. Thanks!

And if you set the Creator to create the feature at the end (setting of Creator) the empty line will be the last to write and not be visible even if you have data to write.


And if you set the Creator to create the feature at the end (setting of Creator) the empty line will be the last to write and not be visible even if you have data to write.

Or use a NoFeatureTester just prior to the writer.


Or use a NoFeatureTester just prior to the writer.

The NoFeatureTester tool is awesome! Thanks for the heads up on this tool, I actually updated the workbench with this one because it for sure keeps the column headers when there is no data and it works like a charm.


Yes, NoFeature Tester tools working fine.


Reply