sehz4d
(Sehzad)
May 9, 2020, 8:49pm
1
Hi,
I want to extract the emails in a folder and write them to the excel file.
I have created the workflow. But I think I am missing something.
It throws this error.
I think I should write something else here.
My another question How can I use the Replace activity here? To extract the only eMails in the file names.
What should I write in this fields? I am confused a little bit
Any suggestion? What should I do ?
ppr
(Peter Preuss)
May 9, 2020, 9:11pm
2
@sehz4d
the exception is indicating that more items as columns exists are tried to insert.
refering to your screenshot there is only 1 column.
So add a second column or remove one item for the add datarow
About the second question. On what / which trigger you want to use for the detection. Share a sample for an email and share a sample for a non email
1 Like
Hi @sehz4d
In Add data row activity in input Array row use only item.{item}
Regards,
Gulshiyaa
1 Like
sehz4d
(Sehzad)
May 10, 2020, 7:41pm
4
ppr:
add a second column
Hey @ppr thanks for your reply.
I was able to do it by adding second column. But I don’t get it why it throws such an error.
sehz4d
(Sehzad)
May 10, 2020, 7:48pm
5
I want to get only the Emails which are in the file names.
Let’s say these are the files.
And the file names starts with e Mail + Person Name. In this case I want to extract only the emails and write them in the excel.
So here is the file names in the excel
How can I extract the emails and write them in a separate column? I know that I can use Regex but how to loop for each file name?
ppr
(Peter Preuss)
May 10, 2020, 7:58pm
6
@sehz4d
Maybe I misunderstood you, have a look on the different parameters of getFiles
maybe following filter will already do it:
Directory.GetFiles(YourFilePath, "@ .txt)
for extrating the email from filename you can use a Match Acitivity or Regex.Match method