Convert Text to string

I try to input info from a pdf to a excel but all to shows is:
System.Linq.Enumerable+d__95`1[System.Text.RegularExpressions.Match],

in all variables,some advice pls?

Hi @fabiosantos_99,

entity(0).Tostring
re(0).Tostring
val(0).Tostring

use for each to get more result

Regards,
Arivu

I had that and it gived a error of assign not value set so I deleted and it worked but didn´t wrote what I want

Hi @fabiosantos_99,

use if condition before you assign a value

entity.Length>0

True->Assign the value

Regards,
Arivu

1 Like

I think the variable tipe isn´t correct but I don´t now either who to use …

error

entity.Count>0

Regards,
Arivu

it only accept methods don´t know why?!?!

Hi @fabiosantos_99,
Sorry it my mistake

Use it in If condition
entity.Any()
True->Assign the value

same thing do for other thing also.

@fabiosantos_99
The exception in your screenshot is due to the fact that the entity, re, or val variables are not of the right type. Matches activity returns an IEnumerable (because the input string can match the pattern multiple times). This is the correct type. If you press Ctrl-k in the Result property of the activity and type, let’s say, matches Studio will generate for you a variable with correct type.
To see if there was a match in your input string you can check with condition : “matches.FirstOrDefault() is nothing”. To see the value of the first match you can do it with “matches.FirstOrDefault().Groups(0).ToString” (make sure you check there is a match first, otherwise you’ll get an exception in case of no match).
Or you can iterate thorough matches to see all the matched values.

The variable is IEnumerable type, I did press ctrl+k and created a variable, but still it gives error.

If type of entity is IEnumerable< Match > then use the methods I told you about at it should work.
If you still have problems tell me that is the exception and what activity throws it. Or you can share your workflow to have a look at it.

Hi @fabiosantos_99

Did you tried

For me working fine can you check

Regards,
Arivu

Yes I did and it didn´t wrote nothing…