BC30574 Option Strict On disallows late binding

Hello Community, I would like if you could help me with some issues in my UiPath code

I get the error BC30574 Option Strict On does not allow late binding when executing my InvokeCode, on lines 18 and 25

At the moment the route does not affect, since I have not been able to execute the process

Also at some points if I use the .Cells method, I get the same error.

I hope you can help me

Although it doesn’t really make sense, it seems like it thinks worksheet.UsedRange.Columns.Count isn’t an integer. Try CInt(worksheet.UsedRange.Columns.Count)

I’m curious why you’re doing all this in an Invoke Code instead of just using the Excel activities that can do the same things.

The worksheet.cells(1,i).Value is returning generic object so you need to typecast to to string

Use CType(worksheet.cells(1,i).Value,String) to fix this

The user’s machine does not “meet” the characteristics and opening Excel, which is what UiPath does, takes up a bit of the user’s memory and takes longer to execute. For this reason I want to ensure that the rpa does not open excel and extract at that point, but instead does it in the Invoke Code

Ok, I’m going to try to access the file that way to check if I’m successful with the activity.

You could just set the activity not to show the Excel window. There are other settings that enhance performance also.

image

1 Like

Ok, I hadn’t seen this part, but I’m going to try it, although I would also like to be able to program a little.

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