How to copy and paste if there is no specific ending row?

Hi, I have to copy and paste a data set but the number of rows the data has changes how do i copy the data table without specifying it? The data starts at column A row 8 and the last column is in AD.

Hi @Eylul_C

Use Read Range activity and mention range as “A8” so it will read the data from A8 through last data

Regards,

@Eylul_C

image

Regards,

HI @Eylul_C

→ Use the Excel Process scope activity, inside of it insert the Use excel file activity.
→ Give the path of the Excel file in Use excel file activity.
→ Inside Use excle file activity insert the Find First\Last row activity to get the last row of excel sheet. Create a variable in the output of this activity called LastRowValue.

Here if you want to copy the data in one sheet and paste to other sheet use below,
→ Use the Copy\Paste range activity in the source give below to read the range from A to AD as below,

Excel.Sheet("Sheet name").Range("A8:AD"+LastRowValue.toString)

→ In Destination field give the range of other sheet to paste there.

If you want to read the Range of excel data and store in a datatable use the Read range actrivity and give below in the range field,

"A8:AD"+LastRowValue.toString

Hope it helps!!

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