Hi Bart,

I checked whether there is a general limit for arrays, but had no problems assigning 240000 (long) strings to an array on my system.

In your code your using LoadDataFromFile from the Tools library?

In this library 'Redim Preserve' is used to expand the array and in my opinion this copies the array to a temporary array and thus uses lots of system resources.

So I think system resources is what limits the reading of lines in this case.
If I'm wrong somebody might correct me?

Hope this helps
Christoph

Bart Aimar schrieb:

The target is to convert a large file.txt in file.csv

(in the source file the fields are in different lines... )

The idea is to store the entire file in array, and after iterate the elements (to manipulate the contents).

But this (symple) code:

Sub Main
 dim contenutofile(121000)' as array
 dim pathfile as string
 pathfile = "c:\Basilicata.txt"
 converttourl(pathfile)
 loaddatafromfile(pathfile, pippo())
 for i = 0 to 12000
 msgbox pippo(i)
 next i
End Sub

seems to work only for wide file...

In large files (130.000 lines) the function loaddatafromfile return Overflow error...

There is a max element nunber for the array, or the limits depend from machine resource?

Any idea or suggest to resolv my problem in OO?

thanks for the answers

Bart

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to