if there are multiple values , the output would only be “DDD” as it only capture the first number
Another example will get “HHH”
Thank you.
if there are multiple values , the output would only be “DDD” as it only capture the first number
Another example will get “HHH”
Thank you.
can you explain little more on the requirement
Hi,
Can you try the following expression, if ther is no number in Column0?
result = dt.AsEnumerable.Where(function(r) r.ItemArray.Any(function(x) Microsoft.VisualBasic.Information.IsNumeric(x.toString))).Select(function(y) y("Column0").toString).First().toString
Sample20200622-3.zip (16.9 KB)
Regards,
it works. Thank you very much
I have faced some issue Why I unable to get the value in A6 cell as it is a merge cells.? Also cannot max the excel worksheet. Any solution?
Hi,
Usually we don’t need to maximize excel window to operate using excel activities. Is there special reason for it? If you need it, perhaps you should indicate selector of excel window. it might be effective to put delay activity before Send Hot key. You might be able to Maximize Window activity, too.
Even if merged cell, we can read cell from left-upper cell as you wrote. Can you share workflow and xlsx file?
Regards,
Here is the workflow and the file. Thank you.
forum.zip (33.3 KB)
Hi,
You need to set variable to Result property of Read Cell activity as the following image. Can you try?
Regards,
It works. Thank you for your help.
Hi @Yoichi,
Is it possible to teach me how to use the AsEnumerable? Thinking whether it can get the first entry in column T.
e.g , I would like to get the value “12.3”
Hi,
In this case you don’t need to use AsEnumerable method if you can use Read Column activity as the following.
list.First(function(x) not String.IsNullOrEmpty(x.toString)).toString
Regards,
My data is at E5:E10 . How to get the first entry from that range? And it may decimal value. The value in E5: E10 will change after that.
Hi,
Hope the following helps you.
dt.AsEnumerable.First(function(r) not String.IsNullOrEmpty(r(0).ToString))(0).ToString
Regards,
Hi,
Can you try Read Range activity instead of Read Column activity as my previous post?
Regards,
You’re fantastic it works
Sorry, I realised that is the range is empty , it will show the following error. Possible to have the value ‘-’ or ‘0’? Appreciate your help.
Hi,
The expression assumes there is one or more non-blank cell.
If there is possibility all cells are blank, we need any of the following
Use below expression
arrayDataRow = dt.AsEnumerable.Where(function(r) not String.IsNullOrEmpty(r(0).ToString)).toArray()
Then check arrayDatarow.Length>0
or
Regards,
Hi,
Value property of Write Cell activity should be the following. Can you try?
HCvalue(0)(0).toString()
Regards,
yes, solved Possible to have show a “-” if the value is empty ? Thank you.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.