Help - Trouble Selecting only certain information from an Excel cell

Hello,

I need help to find out how I can extract, out of every cell in this table, only the interviewees name. I have tried using for each row, but it doesn’t seem to work.

1 Like

Good morning Gabinlobo,

Please paste a copy of the full string in this post (replace any sensitive data) and specify which part of the string you want as your end result.

Consultor 1: (persons name)
Entrevistado: (name)
Cargo: (job position)
Onda: (company)
Cliente: (client)

I would just need the name that comes after “Entrevistado”

1 Like

Thank you Gabimlobo, you should able able to use the follow RegEx expression to extract your the name field:

(?<=Entrevistado: \()(.*)(?=\))

This will go in an assign stage as follow:

System.Text.RegularExpressions.Regex.Match(stringVariable, “(?<=Entrevistado: \()(.*)(?=\))”).Value

3 Likes

@chenderson Damn! Need to master this RegEx! :grimacing:

2 Likes

and how do I use this for every cell in the excel table? Do I use for each row or for every item?

Thanks!

@SaiKrishna147 Right!?

I’m still learning it too! Definitely a powerful tool for text manipulation.

@gabimlobo

Once you’ve used Read Range and have the table from Excel in a DataTable, you will use the For Each Row activity.

2 Likes

and use the assign activity inside the for each row?

Absolutely, you got it!

1 Like

it’s giving me an error:

Source: Assign

Message: Value cannot be null.
Parameter name: input

Assign this RegEx expression to a variable in assign activity.

2 Likes

I already did…

what I need to do is to extract the name in each cell and store all names somewhere so I can input them in a website afterwards.

what I need to do is to extract the name in each cell and store all names somewhere so I can input them in a website afterwards

Hola @gabimlobo,

Que tipo de variable estas usando?

Hola @carmen! Estoy utilizando un string para hacer el assign

Pense que quizas tenias ese error por el tipo de variable que usabas, entonces creo que podria ser que estas leyendo celdas sin valor o quizas no todas las celdas que estas leyendo tienen la misma estructura y por eso te arroja el error.

Yo estaba probando lo que te sugerian y me funciona bien.

aun tienes el problema?

sí, aún tengo el mismo problema. Podrias mostrame como lo has hecho para verificar si lo estoy haciendo bien?

justo estoy estudiando Regex ahora y le hice un cambio a lo que te decian pero funciona igual …