I SET if last activity goes error, then put a “1-null” on excel,
then use IF activity to read the cell:
IFcell is empty, then goes A sequence, otherwise, goes next sequence.
But nomatter i tried,the my robot does put 1-null on excel, but if activity goes Asequence(should goes next one, because i put 1-null on it).
And if i leave that null on excel, then rerun the same sequence again, it goes next sequence(right).
What happened? why it cant read at first time?
Here are my xml and picture, plz take a look, thank you.
As per my understanding, you want to read the first column of a given row (reference to the first column by index) and this is where things are going wrong :
To read the content of the first column the condition must be
String.IsNullOrEmpty(row(1).ToString) , the difference is
String.IsNullOrEmpty(row("1").ToString) is looking for a column with the name ‘1’.
Hope that helps ! Kudos
Yes, i do want to looking for a cloumn with 1, there are 7 days, i put Monday situation as a column named1
Could you please share the excel with sample data filled.
Ya, here they are
Murchant_List.xlsx (21.4 KB)
Somehow i use another stupid to sovle it
when it goes error, sequnce will create an txt then put some string on it,
then goes if the txt is null do SequenceA or do next…
But this solving is really stupid.
Dont know why it cant read the thing that put on excel lately.
As per my understanding this is what you are trying to do.
- Read Murchant_List.xlsx into Datatable
- Loop Over the Datatable & Perform some operations
- If there is an error for any particular row then, update a particular column of that row
- Now you want to check if that column is updated or not , based on that do something
If this understanding is correct here is the solution:
Instead of doing write cell , update the data in the DataTable directly
This is because when you write to a cell, the file is updated, not the datatable. If you update the DataTable directly when you check the condition
String.IsNullOrEmpty(row("1").ToString) it will be true if it’s set.
After the for loop is complete write the fully updated datatable to excel or write every row to excel after processing each row.
Hope that helps ! Kudos
Oh my god~!!! its working!!
thank you sooo much!!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.