i’ve used a for each row , because i want to read some values to get the max and the min value(Prices)
But i get this error message ?
Compiler error encoutered processing expression “result”.
Option Stict Ib dusallows implicit conversions from ‘System.Collections.Generric.IEnumerable’(Of objet) to ‘System.Data.DataTable’
Any help please?
You’re probably using a generic
For Each which needs to have the type property set to
There are lots of examples around: https://forum.uipath.com/search?q=loop%20datatable%20for%20each
Hi there Hamza Soufiane,
As Badita has stated, you are likely utilising
For Each when iterating, which is causing the disallowed conversion error.
If you specifically require the use of
For Each then follow his advice, otherwise I would use
For Each Row.
I have created a VERY basic component, which appears to complete what you require.
Thanks in advance!
forEachExample.xaml (17.1 KB)
But please there is a simple methode to get the max value from a table?
You can use Lambda expressions.
YourDataTable.AsEnumerable().Max(Function(res) res.Field(Of Int32)("Column0"))