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:

String.isnullorempty(CellValue)
Then
Here take your write cell
Else
Do nothing :grin:

@TJ1

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

image

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!

@TJ1

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

@TJ1

Please change condition
from

String.IsNullOrEmpty(Cellvalue)

To

not String.IsNullOrEmpty(Cellvalue)

For write cell unitl the first empty

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

1 Like

@TJ1

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.