View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Import Text File Directly to an Array

If you use DataImport Text File and follow the wizard, you can set the
delimiter to a " ; ", then no problem with number of characters in a cell
and no need for Text-To-Columns.
You will of be limited to 256 column in versions before 2007.

NickHK

"Adrian T" wrote in message
...
Hello,

I have data in a text file (semicolon delimited) like this

0;Name1;0.001;0.002;0.003;;;;;and a lot lot more (70k characters/digits)
1;Name2;0.005;0.006;0.007;;;;;and a lot lot more
2;Name3;0.005;0.006;0.007;;;;;and a lot lot more
and a lot lot more lines

What I used to do was that I initially imported the data into a cell wtih
the querytable function (one line per one cell). Then, I used the split
function to store the data into an array (one cell per one array) and the
program started from there. This worked perfectly fine when each line had
less than 30k characters. Now, I have more than 70k characters per one

line
and therefore I can't physically import them into one cell. Excel limits

the
number of characters in one cell to about 32k.

Is there a way that I can directly import the data and store it into an
array (one line per one array) without having to physically write the data
into a cell first? This way (if possible) I can bypass the limitation that

a
cell can hold.


Please help and thanks in advance,
Adrian T