Hi All,
I’ve been working on this for ~3 hours without much progress.
I want to extract a list of numbers, and determine the maximum in the list.
Extracting, from the webpage, will keep the numbers as strings, and the max found will be ‘9’, and not ‘64’.
I can ‘for each’ and convert each row and write it out as an int, and write line it, but I actually don’t know if I can find the max from that list (i.e. and if the string > Int actually works)
I tried playing around with a lot of different conversion types, etc, but I always seem to get “cannot be converted” errors and the like.
My file is a bit of a mess, so ignore the areas that simply don’t work, I have commented them out anyway.
Attached is the file.
How is the best, most logical approach to this?
edit: additionally, I would get the error around “Strict Only is On, cannot do ” I Am not sure if that is inhibiting me? I notice that it only seems to appear in this “test bed” file.
In my opinion you should create System.Collectione.IEnumerable<Of Stirng> and this is your variable with string list. not List<Of String> or You are just missing the definition of the List you are trying to fill.
Moving forward there is no point to using Strings list, go and create list of INT’s or doubles to be precisle.
I would use something like this newList = New List<Of Double> newList = ( From row in dt.AsEnumerable() Select Double.Parse(row("ColumnName").ToString)).ToList()
Hello Jeremy,
In this video I filter the text in multiple ways to have a perfect format for Generate DataTable (maybe this will help you):
30:30 Generate DataTable 33:00 Filter data for multiple fake spaces before Generate DataTable 38:20 Filter data with multiple spaces inside of column
Thanks,
Cristian Negulescu