cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error in copy paste range of excel VBO

KumariYadav1
Level 5
Hi,
Please help me with the following :
Error :
"Failed to copy worksheet: You can't paste this here because the Copy area and paste area aren't the same size.
Select just one cell in the paste area or an area that's the same size, and try pasting again."
This is the error i am getting in the action copy paste range of Excel Vbo.
But the problem is sometimes its running totally fine and sometimes showing this error.
I have two excel file , The original file in which all the data is present , in this excel i m applying some filter and then copying some column values to another excel.
so here originally i was using 20 rows in the original excel , so in this situation it is working ,
but when i am trying to delete some rows from original excel and then performing all the action ,then its showing the above mentioned error.
Can anyone help me with this.



------------------------------
Kumari Yadav
------------------------------
5 REPLIES 5

mkumar407
Level 7
Hi Kumari,

Solution is there in error message. 
Before pasting data Using MS Excel VBO - Paste. Use Go to Cell - "A1" so that active cell is A1 and paste will have option to use full excel to paste unknown set of data copied from first excel.

Thanks.

------------------------------
Manish Kumar
Sony India Software Centre
------------------------------

Hi, thanks for your response ,
First thing ,actually I want to paste it to some particular cell,
second is I am using two different excel file so if i will use "Go to cell" so, I am not sure that how it will identify that this command is for which excel because in this Action its only asking for handle and cell reference.
Can you tell me what will be the range value if i want to select a full column from 5th row, like for selecting full column we use A:A, if i am trying A5:A , then this is giving error.
help me in this , thanks

------------------------------
Kumari Yadav
------------------------------

@Kumari Yadav, Fine?
Are the two files open in the same excel handle?
If so, use the "Activate Workbook" action to activate the second file.

To select the entire column from the fifth row you must use "A5:A", but for that make sure the file is connected and activated.
Doing this you should have no problem​



------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
+55 (081) 98886-9544
If my answer helped you? Mark as useful!
------------------------------
Sr Cons at Avanade Brazil

Yes Ferreira, I already tried this way but I don't know why sometimes it was running fine and sometimes creating issue, so that's why now for this thing im using write to excel.
so it has been solved now.
Thanks everyone for the response.


------------------------------
Kumari Yadav
------------------------------

I have got rid of the problem by enabling paste special in file options.



------------------------------
Gia Anns
------------------------------