Word table header row bg color change

I have a requirement where i need to copy tables from 2 sheets from multiple excel files to same word doc. Say there is a table1 in sheet1 and table2 in sheet2. I have to copy table1 to doc and change bg color of header and then in the next page copy table2 to doc , enable repeat header , change bg color of header and then move to next excel and get table1 and and copy to the same doc in a fresh page and so on. I am using hot key to do the bg color change. For some reason it is not happening from the second iteration. Any help is appreciated.


Before moving to word let’s try changing the header colour in excel itself first
And did we try Using this activity

Cheers @arunasan

Hi @Palaniyappan
Yes , infact the excel that I am copying from already has a background color. But once it is copied to the word doc using the activity “Insert Data Table in Document”, it removes all the formatting.
Also, I am only copying the required columns using the filter wizard.


Datatable won’t carry the color set to it’s data in excel

  1. If you would you like to merge row table with same header and paste it in first page of word document, then first let’s read the data from two excel and merge them with MERGE DATATABLE activity
    Now the destination datatable will have both the records with common header

  2. Now use a write range activity and pass dt as input and Enable Add Headers property

  3. Once after writing to a excel use the same file path and pass it to Start process activity in filepath property

  4. This will open the excel file in foreground

  5. Now use a SEND HOT KEY activity with key as ctrl+a

  6. Again another send hot key activity with key as ctrl+c

  7. Now use a start process activity where pass the word document filepath as input

  8. This will open the word document and once opened use a send hot key and use ctrl+f

9 now use a type into activity and search for alt text where the table has to be pasted

  1. Now use a SEND HOT KEY activity with key as ctrl+v which will paste the value in that place holder

This is something with UI interaction

Cheers @arunasan

@Palaniyappan ,

Thank you Palaniyappan but if I understood your approach correctly, that wont help with my requirement. Here is my requirement.
Say you have 3 excel spreadsheets for now, one for state, CA, other for DE, and other for VA. Each excel have about 5 sheets.
Sheet 2 is “Projects” with say 10 columns - Rows span across multiple pages
Sheet 3 is “Summary” with say 6 columns - Just one row
I will have to copy 6 columns from Summary sheet from excel CA to the first page of a word doc.
In the next fresh page of the same word doc, I will have to copy 8 columns from Project sheet from excel CA . In the next fresh page of the same word doc, I will have to copy the Summary sheet data from excel DE and then in the next fresh page, copy the Project sheet data from excel DE and so on…
Please let me know if this helps to understand my requirement.

Could you please let me know if the approach you suggested would work for my requirement mentioned above?