[Gambas-user] How to make an array
Charlie Ogier
charlie at cogier.com
Wed May 6 15:39:49 CEST 2020
Hi Dag,
If your CSV file is set up something like: -
forename, surename, mail, tel, sock colour!, etc
I suggest you open the file with a line like: -
Dim sData as String = Split(File.Load("MyFile.csv"), gb.NewLine,
Chr(34), True, True)
This will split each line into 1 element of the sData array
You can then Split each line, when needed.
I have attached a program that is in early development but should open
your file and display the contents in a GridView
If you want more help pop a post at https://forum.gambas.one/
Charlie
On 05/05/2020 13:39, Dag Jarle Nerland Johansen - Gambas wrote:
> Hi,
> I got unsure how to create a dynamic two-dimensional array.
> I need to read in a CSV for processing addresses.
> That means a variable length of the array, but the field numbers are
> always the same.
> forename, surename, mail ...
> Can anyone help,
> thanks,
> (I know I should know this by now but I only program now and then with
> long pauses in between)
> Dag
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: No_db_Database-0.0.4.tar.gz
Type: application/gzip
Size: 68369 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200506/2d442964/attachment-0001.gz>
More information about the User
mailing list