reading files in array

M

Maga Circe

i use this code for importing a file csv into an array

Do While Not EOF(1)
i = i + 1
Line Input #1, cRecord
tRec = Split(cRecord, ",")
for j = 1 to 5
tRin(i, j) = tRec(j)
next
Loop

can i use the code

Set fs = CreateObject("Scripting.filesystemobject")
Set ts = fs.GetFile(strFile).OpenAsTextStream(1, -2)
strTable = ts.readall

amd put into an array all the strTable at once?
i can do it in excel if i put a table variant and then the range.value into
it, but how in word?
 
R

Russ

It might be better to open it in Excel first and format and sort it there
first and then open it as a worksheet in Word.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top