Argument 'PathResource': BC30512: Option Strict On disallows implicit conversions from 'String' to 'IResource'. The selected value is incompatible with the property type

Argument ‘PathResource’: BC30512: Option Strict On disallows implicit conversions from ‘String’ to ‘IResource’. The selected value is incompatible with the property type.

You are trying to use a string, when you need an iResource data type.

You need to use the appropriate data type, you can look up how to use an iResource, you likely want a LocalResource but have given very low context.

which data type should i use can you check it

@Ejaz_Ab ,

Try converting your local file to IResource using this code. Pass this expression in your Read CSV activity.

LocalResource.FromPath(currentText)

1 Like

can you give me concept of this i didnt use it be default it used i think

@Ejaz_Ab,

IResource is an interface that represents a generic resource, often a file or a folder. It’s used in activities that deal with files or other resources to provide a consistent way to access and manipulate them.

FromPath method is specifically designed to transform a file path string into a UiPath IResource datatype, which is often required by activities that handle file operations.

2 Likes

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