Re- "Are you aware..."
Thank you... but...
1) I want my file loaded CORRECTLY!
(When I tried LoadFromCSVFile just now, spaces as well as commas were treated as field delimiters!)
2) I read about those along the way... and also read that I needed to install "extra" stuff on top of my "basic" Lazarus IDE to use them. (This was at
http://wiki.freepascal.org/CsvDocument)
My solution works without the "extras"...
ALthough investigations just now suggest that maybe what I read was out of date. My solution leaves me "in the driver's seat" in respect of details, anyway. For instance, I can choose whether (or not) to trim spaces from either end of data as it loads. Perhaps not entirely an answer to "why do it the hard way?", I admit.
I wondered: Does the "built in" LoadFromCSVFile automatically "size" the StringGrid to suit the data in the file being loaded? My newbie experiments suggest that it does... but the number of columns is(?) entirely controlled by the number of fields in the first line... easily added to my "answer". My version already creates rows as needed, as does LoadFromCSVFile.
(For others with Google skills as limited as mine, the place I SHOULD have gone, when I was looking to see if wheel already invented was...
http://wiki.freepascal.org/Grids_Reference_Page