I am using a template in excel but at writing it dissappear

Hello all,

I am using a template in excel to proceed with the automation. The bots get the template, read range and paste it to the output excel file (for each transaction a new sheet is created in the output excel file). The issue is that I use write range to write the template in the output, but when I write the datatable in the output excel file, the template dissappear. The datatable is written as it would be in a new sheet.

For example, the template contains colors. But when I write the datatable, the colors dissappear.

I cannot use excel application scope because the process is based in background mode.

Can you help me with this issue?

Many thanks!

Hi @Angel_Llull_Rivero1

Maybe it will help to save the workbook after paste step?

This is what I do. First write template and then dt:

image

Hi @Angel_Llull_Rivero1

Try to use Kill Process activity In-between the Write Range activity

Process Name - “Excel”

REgards
Gokul

I have tried but it is not working…

Do you have any error while running the process. If yes share the Screenshot @Angel_Llull_Rivero1

Regards
Gokul

That is not good advice. There’s no reason to kill Excel, and Kill Process is generally a bad idea to use anyway - only a last resort.

No, no error appears…

I might be wrong but, aren’t DataTables formatted as plain text?

My personal solution would be instead of having the writeline to attempt writting the template, why not having a generic template file and create a a copy whenever you need to use it, in that way you will preserve the formatting.

Hi,

I believe your template is overwritten by your data table. Can you try writing the date table on any empty rows below your template and see if you can retain the colors you mentioned missing.