Skip to main content
I need to write to a single excel file with multiple sheets using a template. I've created a template with multiple sheets formatted as I need them but when I write to excel, it will only write one of the sheets and leave the others blank.

Hi @mcannalea12​ did you configure the option in the writer Sheet Name:

 

Output_Excel 

Thanks in Advance,

Danilo

 

 


Hi @mcannalea12​ did you configure the option in the writer Sheet Name:

 

Output_Excel 

Thanks in Advance,

Danilo

 

 

I changed the Sheet Names to match the corresponding template sheet name. So in the template excel file, I have Sheet 1 and Sheet 2. Then in the workbench I created a writer to write ExcelFile.xlsx and the Sheet Name is set to Sheet 1. Then I have a second writer, still writing to ExcelFile.xlsx but Sheet Name is changed to Sheet 2. It seems Sheet 1 will populate just fine but then Sheet 2 is blank.


I changed the Sheet Names to match the corresponding template sheet name. So in the template excel file, I have Sheet 1 and Sheet 2. Then in the workbench I created a writer to write ExcelFile.xlsx and the Sheet Name is set to Sheet 1. Then I have a second writer, still writing to ExcelFile.xlsx but Sheet Name is changed to Sheet 2. It seems Sheet 1 will populate just fine but then Sheet 2 is blank.

Could you share your workspace and data?​


I changed the Sheet Names to match the corresponding template sheet name. So in the template excel file, I have Sheet 1 and Sheet 2. Then in the workbench I created a writer to write ExcelFile.xlsx and the Sheet Name is set to Sheet 1. Then I have a second writer, still writing to ExcelFile.xlsx but Sheet Name is changed to Sheet 2. It seems Sheet 1 will populate just fine but then Sheet 2 is blank.

Forgot to include all the documents in my first reply. This is sensitive data, so I've stripped everything out except a single row of informatoin.


Hi @mcannalea12​ 

Based on the workspace, you're seeing this behaviour because you have two Excel writers writing to the same file. When both writers are creating the same file, the first file created is overwritten by the second writer and you see only the results of the last Excel writer that runs.

Add a feature type for one of the Excel writers and delete the other writer to avoid overwriting. I hope this helps.


Hi @mcannalea12​ 

Based on the workspace, you're seeing this behaviour because you have two Excel writers writing to the same file. When both writers are creating the same file, the first file created is overwritten by the second writer and you see only the results of the last Excel writer that runs.

Add a feature type for one of the Excel writers and delete the other writer to avoid overwriting. I hope this helps.

Yes, thank you, that fixed it! I knew it must be something really simple I was missing!


Reply