Copy paste range2

anyone can tell me i want to copy paste range from (A:CA)

image

Hi @yogitagaikwad2206

You are giving the wrong range. You have to give like beow,

BaseExcel.Sheet("Sheet name").Range("A1:CA100")

If you cannot mention the proper range it will not work.

Hope it helps!!

(“A1:CA100”) Actually A1 is ok but CA100 i don’t know the exact range of CA means sometimes large no of rows data or sometimes may less no of data the how i give CA value

@yogitagaikwad2206

"A1:CA"+((Excel.Sheet("Master").RowCount)+1).ToString

Give this in .Range(“A1:CA”+((Excel.Sheet(“Master”).RowCount)+1).ToString)

Rowcount is the function it gets the no of rows in the Master sheet from A1 to CA range

Hope this will help you

ok, after doing this it can delete existed or old data from A1:CA rows?

@yogitagaikwad2206

Source:
OutputExcel.Sheet("Sheet1").Range("A1:CA"+((Excel.Sheet("Master").RowCount)+1).ToString)

In the input sheet it can copy from A1 to CA rows it does not delete

In the destination file i want to paste that A1:CA data ,but before that delete old data from A1:CA

@yogitagaikwad2206
Use delete sheet activity before copy paste range.In

i can’t use delete sheet activity because i want record After CA column as it is

@yogitagaikwad2206

then use this activity.
image
Delete entire data except headers

can u tell me how i give range for A to CA column because i want to delete all rows data from A to CA

@yogitagaikwad2206
image
If you enable add headers then it will not remove headers row.If you disable it then it will delete headers also from that range.
Hope it works for you

Actually, i am tyring your solution but excel is in protected mode and i want to enable it because everyday it is created in protected mode & first i want to enable it how i do it?

Do you want to get the CA untill the last row.

If yes, then you can use the Find First\Last row activity to find the last row value of CA.

Check the below steps for better understanding,
→ Use the Find First\Last row activity give source as OutputExcel.Sheet(“Sheet1”)
→ Give the Column name of any of the column with in double quotes.
→ Create a variable in the Save Last row number as field, let’s call the variable name as LastRowValue.
→ Then use the Copy\Paste Range activity and give the below in the source,

OutputExce.Sheet("Sheet1").Range("A1:CA"+LastRowValue.toString)

→ Give below in the Destination field,

BaseExcel.Sheet("Base file-Claims).Range("A1")

→ Then use the Clear Sheet\Range\Table activity to remove the required range, give the below range as below,

OutputExce.Sheet("Sheet1").Range("A1:CA"+LastRowValue.toString)

Check the below workflow for better understanding,

Hope it helps!!

first delete rows data from column A1 to CA in base excel file i.e destination file

after manually enable editing u r solution is not work all data as it is excel file

Okay @yogitagaikwad2206

Then specify the same range in the Clear Sheet/Range/Table activity give the below range,

BaseExcel.Sheet("Base file-Claims).Range("A1:CA"+LastRowValue.toString)

Can you show your full workflow what you did… @yogitagaikwad2206

This is my full workflow

first i’m trying to check record is delete or not but it gives an error