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


#1

Hi Team,

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

Folder Policy ID Lookup.xaml (34.4 KB)


#2

Where is the screen shot ?


#3

Hi @skini76,

Please refer below,
Thanks

image


#4

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


#5

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


#6

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.


#7

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


#8

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)


#9

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

You can use recording facility to simulate human actions.

Does that work for you ?


#10

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?


#11

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


#12

Hi @ skini76

Thanks for the advice.
I will try it.


#13

@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


#14

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