Maria99
(Maria99)
August 5, 2021, 11:13am
1
I want find number from file name pdf.
and bring number ti find owner from file Excel.
Example : first file pdf = Charge_210_062021_Invoice.pdf
I want to find number 210 in file excel Column D , If found read column H in same rows.
But now I have 100 file and my flow as below , It take time to read each row in file excel.
Please guide me about it.
You can try using Lookup Datatable activity
1 Like
Dawodm
(Mahmoud Dawod)
August 5, 2021, 1:21pm
4
Please check this channel to learn more about Excel Automation with C#. It is faster 100 times than for each activity etc.
Here some video links for excel using c# code:
Sort Excel Sheet with C#: UiPath | Sort Excel Sheets | How to sort Sheets in Excel | Sort Sheets in Excel with C# Code - YouTube
Rename Excel Sheet with C#: UiPath | Rename Excel Sheet | Rename Excel Worksheet | Rename Excel Sheet using C# Code | Excel C# - YouTube
Adjust Column Width with C#: UiPath | Adjust Column Width | How to adjust column width of an Excel in UiPath with VB.Net Code - YouTube
After watching these videos you will learn how to connect to Excel in UiPath with C# code. You may find all what you need in these videos. For more information or when you created the code with C# and you need more help please contact me. I will try to help you then.
Best regards
Mahmoud
Hey Maria! I don’t know if I understood very well, but I believe the long time is due to multiple read cells!
You’ve already read the entire table and already have the information for this cells, so instead of the read cell you could use
If CurrentRow.Item(4).toString.Equals(numFile)
Then
Assign CurrentRow.Item(8).toString
Dear @Maria99
For verifying “210” is in Excel ColumnD, you can make use of LINQ query. Output will be boolean datatype.
Query to extract all the values from the row.
Refer to the attached workflow.
anyWhere.xaml (8.2 KB)
Regards,
Goutham
Maria99
(Maria99)
August 6, 2021, 1:44am
7
@GouthamVijay How to set assign is dtRow ?
File excel as below :
Master.xls (36.5 KB)
My flow as below:
Project.xaml (11.6 KB)
Dear @Maria99
dtRow is of DataTable datatype
Maria99
(Maria99)
August 6, 2021, 9:28am
10
@GouthamVijay Change variable dtRow to DataTable already.
ฺBut error as below.
Please guide me about it.
Dawodm
(Mahmoud Dawod)
August 6, 2021, 9:40am
11
@Maria99 was the type DataRow?
If not you can set it as DataRow.
Maria99
(Maria99)
August 6, 2021, 9:49am
12
@Dawodm How to change it?
Project.xaml (11.6 KB)
Master.xls (37 KB)
Dawodm
(Mahmoud Dawod)
August 6, 2021, 9:53am
13
Unfortunately I can not see the activity. There is a problem.
But try to set this type for your variable:
System.Data.DataRow
Dawodm
(Mahmoud Dawod)
August 6, 2021, 10:01am
15
And you tried with System.Data.DataTable?
Dawodm
(Mahmoud Dawod)
August 6, 2021, 10:55am
17
Can you please share your excel file. Because your statement is wrong. You search for the column name but this statment to search for the content of the column. So no column has this input.
Dawodm
(Mahmoud Dawod)
August 6, 2021, 11:01am
18
Please try it as follows.
Sequence23.xaml (6.0 KB)
Dear @Maria99 ,
NumFile.ToString is a variable in your assign statement,
‘“+NumFile.ToString+”’
Replace with the above statement.
Dawodm
(Mahmoud Dawod)
August 6, 2021, 11:02am
20
Here you have to set your variable instead of 210
Maria99
(Maria99)
August 6, 2021, 11:06am
21
@Dawodm If use for each row , it take time more to run.
Because I have data about 100 rows.