Headers are not Shown when copy Table

Hello all,

I have a project where i query DB and get the results in Excel and then i need to copy that table to a word document. i manage to do all steps and it works perfectly except that the headers are not being pasted although I did not tick “Exclude Source header”

what might be the issue here?


Please check “Exclude source headers”, run again and try to find if it is a difference in the output.
Tell me the result, pls.

Thank you for your kind reply.

I just did; exactly same results…no headers

I tried to use read range instead but when attempted to past as picture, it complained with the below

Hello @firas, you have a formatted table in excel right? With your current source you only get the values from the formatted table.

You could try to copy Range A:Z or just the whole sheet to get headers as well.

Kind Regards

Thank you Lukas
yes, i have a formatted table and i need it like that as the data is different each day and i need to capture it dynamically; i cannot copy the full range as it will bring the empty cells

Hello @firas, I don´t know if there is an easy way to get the headers also.

You could do it like this though, if you have at least the same columns.


Else you would have to get the columns first and maybe store them in a variable.

Hope that helps.

Kind Regards

The headers are static; the only thing that will change is the rows values!

i will try your suggestion now but how can i reach to that in StuidoX

I don´t have StudioX, so I don´t now the limitations really…

You could try to enter “Excel.Sheet(Excel.Table(“YourTableName”).Worksheet).Range(“YourRangeA1:B” & Excel.Table(“YourTableName”).RowCount+1)” into Source.

or use the Activity “Find First/Last Data Row”, so you can get the exact range you need.

Kind Regards

thanks again and excuse my reply as i am no developer!

this is what i got

no problem, I am no developer either :slight_smile: .

Can you try:
and set “First row offset” to -1
then with

Excel.Sheet(Excel.Table(“Table1”).Worksheet).Range(“A” & firstrow & “:B” & lastrow)

where Table1 should be your Tablename and “A” and “:B” should be your columns

Kind Regards

1 Like

Sorry but i got the same error!

test project is attached
TestTables.zip (339.8 KB)

Test.zip (3.0 KB)

does this work for you?

unfortunately not

I found the issue

it was the double quote; i just replaced all double quote with " and it is now working like charm

thank you so much

1 Like

sorry, for not replying yesterday. And good :+1:

1 Like

it alright! you already helped me
thanks again

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.