Replace table with another table in word doc

Hello,
I am trying to create an automation where it inserts a table (pulled from an excel spreadsheet) into a word document and then saves as PDF. I’ve gotten it so it works the first run through, but I have multiple tables that need to be put in and so I am trying to figure out how to get it to replace one table in the word document with another table. I have it so the table is a variable and it replaces the word ‘spreadsheet’ in the word doc with the table from the variable.

I’ve tried having it locate the variable in the document and replace that but it didn’t work. I’ve tried replace text but the table varies in size and content (can be two lines, could be hundreds). I tried with the ‘insert data table into document’ to have it place after a certain text/phrase but it just inserts the table after the previous table instead of replacing it.

Ideally, if I could have the automation clear all text after a certain point and then input the table, that would be great but I’ve run out of ideas on how to do this. Anyone have any thoughts/has anyone tried this before?

Hello,
i arleady got similar issue with the copy/paste between Excel and Word
Did you try to copy/paste the data directly as a human will do meaning through the interface with the past options that was how i solved it on my side
image

Clarisse,
I gave this a try and it’s not working the way I need it to. Manually, I can select just the table, delete it, and put in the new table. I can’t find a way in StudioX to just select the table. The ‘get text’ activity would theoretically work if the table was just on one page but often it can be multiple pages long and the ‘get text’ activity doesn’t work in that situation.