reactivating opened excel file worksheet ac

Dear apple friend , I am using two excel files , copying the data from one file(source ) and pasting it to another one(target) .
It is opening the target excel file when I am opening it first time , and activating it properly . When I am trying to paste the data of second excel sheet (source) on the target excel file sheet , It is giving the following error .

Microsoft Excel got an error: workbook “homes:kk:Desktop:dat-003-004-kk-target_ligation.xls” doesn’t understand the activate object message.

I have used the following syntax :

if target_file_open_status is equal to 0 then

–for the opening of the first time
display dialog “opening target sheet”
open workbook workbook file name target_excel_file
–activate workbook workbook target_book_name
activate object worksheet target_sheet_name
set target_file_open_status to 1
—next time consecutively
display dialog “reactivating target sheet”
activate object workbook target_excel_file
activate object worksheet target_sheet_name
end if

if i use the same syntax as used first time opening : like open workbook workbook file name target_excel_file
It is asking target_excel_file ( any imaginary name given to target file ) is already open , which is very annoying because in one excel file (source ) having number of sheets more than 100 .

Please help me to get the job done . Your small help will be highly appreciated .



Activate object in Excel doesn’t accept Windows/Worksheets. There’s a activate next.

tell application "Microsoft Excel"
activate next window 1 -- the window you want to move to back
end tell

note activate next is for windows not worksheets.

Have fun