The process run slow when excel file has many row

Hi everyone.

I have a problem with my process…

I have one excel file as attached… I want to check the contain Column A of Sheet Name " input(dosmetic) " , if the contain include some keyword same with Sheet Name " Defect code " then it will write the " 1 " number into the B column of Sheet " include(dosmetic) "

But problem is the excel has many row, it can not run and I must wait very long time and then close process… when I delete many row, it can run normally.

Pls check my XAML file and support to me.

Thanks in advance!

Hi @Jan_Brian_Despi pls ^^Book2.xlsx (255.3 KB)
Classify Module.xaml (45.3 KB)

1 Like

Hi @trunghai,
It is normal that it will run longer than expected because it has many rows.
If you really want a faster process (very fast), you may want to try working with macros (VBA). :slight_smile:
Thank you!

1 Like

Hi @Jan_Brian_Despi

I know VBA but I want to use the Uipath.

It run very slow.

1 Like

Yes. It will run really slow because it will loop to every row :slight_smile:
More rows = More execution time

Hi @Jan_Brian_Despi

Could you pls use macro and invoke VBA for this case ?

I know VBA but I have not ever use invoke VBA activity .

Thanks you so much!

Sorry, anyone has know another way to resolve this problem ?

Hi Everyone…
Hi @Jan_Brian_Despi

I have write a VBA code as below. How to use Invoke VBA in this case ?
Dim sArr(), dArr(), Rws As Long, I As Long, K As Long, R As Long, Txt, Txt1 As String
Dim a As Integer

For a = 2 To 100
Rws = Range(“A1000000”).End(xlUp).Row
If Rws = 1 Then Exit Sub
Txt = UCase(Sheet14.Cells(a, 2))
''a = a + 1
sArr = Range(“A1:A” & Rws).Value
R = UBound(sArr)
ReDim dArr(1 To R, 1 To 1)

For I = 2 To R
If Txt <> “” Then
If UCase(sArr(I, 1)) Like “" & Txt & "” Then
Sheet1.Cells(I, 2) = “1”
End If
End If
Next I
Next a

Hi @trunghai.
Please check this zip file: (172.1 KB)
It has vba.txt file.
It seems that your vba is not working. I tried changing value for a cell and it worked.
So please revise the VBA code that is inside vba.txt.
Thank you


Hi @Jan_Brian_Despi

Thanks you so much ^^

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.