Posted to microsoft.public.excel.programming
|
|
Fill Array from a CSV File
Dim varr as Variant
workbooks.Open "C:\my files\myfile.csc
varr = Activeworkbook.Worksheets(1).UsedRange.Value
Activeworkbook.close Savechanges:=False
now varr is a two dimensional array containing your values.
--
Regards,
Tom Ogilvy
Jase wrote in message
...
Personally I would create a new sheet and import it to
there. Then fill the array off the new sheet you have
created. I am not sure of the code to do this but you
should be able to record it or someone else will know.
Jase
-----Original Message-----
I need need help with code to open a csv file and then
fill a 2
dimensional array with data contained in a csv file.
This is an example of a entry from the file.
Region,12345678,0001,Ex Code,525,Cust Name,Unit no,Street
No,Street,St
Type,Suburb,Ex Code & Address,,,01-NOV-03,Raw Data
String,,,,,,,,123456780001,17/10/03,10/10/03
There are approx 12,000 lines (rows) in the file which
will increase
daily
thanks in advance
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from
http://www.ExcelForum.com/
.
|