oscar.o
February 6, 2023, 11:21am
1
Hello!
I have a question about “Excel For each Excel Row”.
If “did” is 0, I want to show the number in the message box.
ex) 0 have eight.
If i check the “Write line”, 0 0 0 0 0 0 0 0 0
Eight of them come out well.
When “message box” is executed, it is written 1 on the message box and repeated 8 times.
I don’t know what’s wrong.
I’ll attach a capture image.
I’d appreciate your help.
Anil_G
(Anil Gorthi)
February 6, 2023, 11:49am
2
@oscar.o
Remove .count in your message box…
Cheers
1 Like
oscar.o
February 6, 2023, 12:08pm
3
Thank you for Replying
However, it not been fully resolved.
message change “0” but Message box 8 is repeated.
I want only 1 message box NOT REPEAT & “C_C_C 0 have eight”
I also attached an Excel file.
practice.xlsx (11.8 KB)
Anil_G
(Anil Gorthi)
February 6, 2023, 12:19pm
4
@oscar.o
As per condition if number is less than 1 message bos is displayed and 0 is present 8 times in the given excel…Hence you are getting 8 times…
if you want to break or stop the loop once you find 0 then use break activity after the message box
cheers
1 Like
If I put the brakes on it, of course I can stop it.
What I mean is…
I just want to see one message box…
that’s knowing “0” having 8.
Because it changes every time. I don’t want to put on a breakpoint, I want to show it all at once.
I apologize if my intention was not clear using a translator.
Anil_G
(Anil Gorthi)
February 7, 2023, 6:00am
6
@oscar.o
Then use fa filter datatable and filter the required row with 0 and then use filtereddt.rowcount and in message box write
"0 is repeated " + filtereddt.rowcount.tostring
Or create a integer variable and initialize it with 0 …then in the then condition use counter = counter+1 in assign and get the count and outside the loop use
Msg box with "0 is repeated " + counter.tostring
Hope this helps
Cheers
1 Like
Hello @oscar.o
Refer to this Xaml file you will some ideas.
Forum_ExcelZeroCount.zip (147.1 KB)
1 Like
Oh! i think maybe close to solution
There’s only one message box
i using filter datatable but still error
But… why saying 0…
Is there anything I missed?
Thank you for replying
you gave me works fine there’s no error!
However, the workbook is not available for dbf.
excel mean sample datatable…
i must using dbf so Use Excel File / For Each Excel Row…
Is it possible to apply dbf?
PRACTICE_2.zip (33.3 KB)
Anil_G
(Anil Gorthi)
February 7, 2023, 8:22am
10
@oscar.o
Give the correct column number …column numbers start from 0 not 1…or give name as "did"
… And try with "0"
cheers
1 Like
oscar.o
February 7, 2023, 11:33am
11
Thank you very much for your infinite kindness.
It was very helpful to give warm consideration to beginner
cheers
1 Like
system
(system)
Closed
February 10, 2023, 11:34am
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.