Error : Unable to cast object of type 'System.Char' to type 'System.String'

Hi Team,

Could you please advise how to troubleshooting as per below screenshot?

Folder Policy ID Lookup.xaml (34.4 KB)

Where is the screen shot ?

Hi @skini76,

Please refer below,
Thanks

image

@azmee_zainol can u post screenshot of the activity due which ur getting error.

Looks like assigning Char value to String variable, I went through the code, problem in assignment

e.g. image

string is assigned to array of string , both side data type should be same

Hi @skini76,

Thanks, that issue has been resolved.
However i have another task.
I would like to trace same text in 2 different Excel files.
How to do this? Could you give some idea?
I have tried using Text Exists but the outcome seems does not meet the criteria.

Policy ID Detect - If.xaml (12.0 KB)

Thanks in advance.

Give me some more details, are you searching in specific column ? Do you know the no of rows in the excel ?

Hi,

I want to search text 10132 in both excel files.Then if both found next progress is to open new page in website.
Data in both excel files are extracted from datatable from Website.The columns are not specific because depends on data from website (our internal website)
Here i attached both files.
Policy.xlsx (9.0 KB)
Folder Policy ID.xlsx (7.9 KB)

How about Open the file in Excel >> Ctrl+F

You can use recording facility to simulate human actions.

Does that work for you ?

Hi Skini…

Again, I want to search text 10132 in both excel files.Then if both found next progress is to open new page in website.Data in both excel files are extracted from datatable from Website.The columns are not specific because depends on data from website (our internal website)
So how can i detect/search the same text in different excel files?

Imagine you are going to do this manually, you will open file A and search using Ctrl+F, If found, then open the file B, search using Ctrl+F, if found then take some action.

You can create a workflow for this using recording facility. If you are new to recording refer the tutorials.

Some example

image

image

Hi @ skini76

Thanks for the advice.
I will try it.

@skini76
May I know the meaning of this error.?
image
here attache the xaml file as well.Policy ID Detect- Compare.xaml (25.0 KB)

Thanks in advance

It is very clear, the variable that you are referring is not initialized.