I am new to uipath here i have one conversation i have to do one task on excel that is we have the or more excel files with data i have to read each and every row of excel and want to get minimum value and maximum value from each of the excel and it has to store another excel can any one give idea about this
Thanks in Advance
Can you please be more specific how you want to fetch maximum value from each row in excel sheet or maximum value from particular column in excel?
Thank you for your response i want to get maximum and minimum value from
overall excel sheet by reading each row and column
var maxRow = dt.Select(“ID = MAX(ID)”);
var minRow = dt.Select(“ID = MIN(ID)”);
Did you refer below topic.
I am using a write text file, in order to save it to a new notepad file. it will write out the highest number, but says it is 9, when the highest number is actually 980.304007
I have : row(“Close”).ToString.AsEnumerable().Max
it seems as if it is not returning the full value
and I also need to return the date associated with the highest value. I have attached the csv file I am talking about
GOOG_YahooFinance_Data.xml (12.4 KB)
You can try @sfranzen way as well but i have also one more way to do this
No need to use for each for this
You can get the highest column value for “Close” Column like this
Int maxval = Convert.ToInt32(data.Compute("max([Close])",String.Empty))
one more way is Datatable.select() as @sfranzen mentioned.
there one more is to use IEnumerable.max method as well
String maxval = datatable.AsEnumerable().Max(Function(r) r("Close")).ToString …