Copy values from Excel cells until the first empty cell

I’m trying to create a workflow that would copy cell values from Excel Sheet 1 and then insert the values to Sheet 2 until the first empty cell on a row.

I’m trying to do this using a variable for the row number. After every loop the row number would increase by one.

I keep getting an error “AsString in not a member of ‘Integer’”.

Below is my workflow:

May I ask your help to fix my workflow or propose a better way to do this.

Thank you!

Use One IF insere your for each and on if type:

Here take your write cell
Do nothing :grin:


Please change “A”+ Counter.AsString To “A”+Counter.ToString


Yes and do what @TJ1 say to

Thanks for your help!

I changed the value to “A”+Counter.ToString but this Read Cell activity will still result in error:

Any ideas what might be wrong? Thank you!


You need to change Variable type of CellValue from String to UiPath.Core.GenericValue


Please change condition



not String.IsNullOrEmpty(Cellvalue)

For write cell unitl the first empty

The workflow is now working perfectly. Thank you all, especially @Natapong!

1 Like


It was my pleasure to support you. :smiling_face_with_three_hearts:

And Welcome to UiPath forum!

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