-
How do I fill a 2D array from a text file
Hello out there!
How do I open and read the contents of a text file and load its contents
(14 "element" columns, and a ever changing number of rows) into an array??
All the "elements" of the text file are all different data types...
Thanks;
Bill
-
Re: How do I fill a 2D array from a text file
Bill,
Is each column always the same data type? I will assume this and give you
two answers.
You can create a UDT (User-defined Data Type) with an element that describes
each column. You can then create a 1-D array of those data types.
Alternatively, you can create a variant array. You will want to pivot to do
this because you can only increase the outer dimension. If you have a 100
rows, you would use
Redim MyArray (1 to 14, 1 to 100)
and later
Redim Preserve MyArray (1 to 14, 1 to 101)
--
Kathleen
(MS-MVP)
Reply in the newsgroup so everyone can benefit
--
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|