View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Bill Martin
 
Posts: n/a
Default how do I download a csv file with 100,000 records into excel?

Oops. That should be: cells(RowCount, ColNbr) = DataRecord

Bill
-----------------------
"Bill Martin" wrote in message
...
What I've done when faced with a similar problem is to use VBA to import
the first 65,532 records on Sheet1, then the next 65,535 onto Sheet2 and
so forth. I don't know how you can do it without using VBA, though
perhaps someone else here can tell you.

If you're comfortable with VBA, the example below reads a big file and
stores it as multiple columns on one sheet. You'll get the drift:

dim DataRecord as string
dim RowCount as Long
dim ColNbr as Long

RowCount = 1
ColNbr = 1

Open "c:\DataFiles\Foobar.txt" for input as #1
Do Until EOF(1)
Line Input #1, DataRecord
cells(RowCount,1) = DataRecord
if RowCount = 65535 then
RowCount = 1
ColNbr = ColNbr + 2
else
RowCount = RowCount + 1
end if
Loop
Close #1

Good luck...

Bill
-------------------------------------------------------

"Lauren" wrote in message
...
I have a csv file with 100,000 records on it, I know excel only downloads
up
to a little over 65,000, and I have tried the Wizard, but it won't let me
export specific rows after about 32,000. I have also tried to change the
csv
file to a Word file and cut it into two seperate files, but then Excel
won't
recognise the format. There must be a way!
PS I don't have Access