How to read excel by rows fastest?

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

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

  1. For verifying “210” is in Excel ColumnD, you can make use of LINQ query. Output will be boolean datatype.

  2. Query to extract all the values from the row.

Refer to the attached workflow.
anyWhere.xaml (8.2 KB)

Regards,
Goutham

@GouthamVijay How to set assign is dtRow ?

image

image

File excel as below :
Master.xls (36.5 KB)

My flow as below:
Project.xaml (11.6 KB)

Any Idea for solve it?

Dear @Maria99

dtRow is of DataTable datatype

@GouthamVijay Change variable dtRow to DataTable already.

ฺBut error as below.

Please guide me about it.

@Maria99 was the type DataRow?
If not you can set it as DataRow.

@Dawodm How to change it?

Project.xaml (11.6 KB)
Master.xls (37 KB)

Unfortunately I can not see the activity. There is a problem.
But try to set this type for your variable:
System.Data.DataRow

@Dawodm It error.
image

And you tried with System.Data.DataTable?

@Dawodm error.

image

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.

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.

Here you have to set your variable instead of 210

@Dawodm If use for each row , it take time more to run.

Because I have data about 100 rows.