Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Reading txt file into the buffer

I have a text file which is large and I am reading the file line by line. The
data has some values on each line and it is taking tooo long. I was wondering
if I could load the file to the buffer or read it as one long string which
would speed up the transfer into excel. The file has about 900,000 lines and
I am reading about 40,000.

The process I am using is reading each line then writing it to the excel
spreadsheet. I didn't think it should take 15 minutes to do that. Please help
with tips of reading a text file that can speed up my runs. Thank you in
advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Reading txt file into the buffer

Hi,

Is the data organized as a table?
Do you need just 40,000 rows based on some criteria?

If so, you could import the data in an MS Access db's table. Then run a
query to isolate the rows you need and export the result to excel.
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"WannaBeExceller" wrote:

I have a text file which is large and I am reading the file line by line. The
data has some values on each line and it is taking tooo long. I was wondering
if I could load the file to the buffer or read it as one long string which
would speed up the transfer into excel. The file has about 900,000 lines and
I am reading about 40,000.

The process I am using is reading each line then writing it to the excel
spreadsheet. I didn't think it should take 15 minutes to do that. Please help
with tips of reading a text file that can speed up my runs. Thank you in
advance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Reading txt file into the buffer

Based on what you have described you should be loading the data to a database
of some sort and then dealing with it from there. Excel is not really well
suited to deal with 900,000 lines of input. Excel can interface with Access
if you want to use Excel as your front end to deal with the data, via pivot
tables or queries. You can post your code but I have strong doubts that we
will be able to speed things up significantly.

My only suggestion if the database thing is not an option would be to conect
to the text file via ADO... Here is a link to help you with that if that is
of interest to you.

http://www.erlandsendata.no/english/...php?t=envbadac
--
HTH...

Jim Thomlinson


"WannaBeExceller" wrote:

I have a text file which is large and I am reading the file line by line. The
data has some values on each line and it is taking tooo long. I was wondering
if I could load the file to the buffer or read it as one long string which
would speed up the transfer into excel. The file has about 900,000 lines and
I am reading about 40,000.

The process I am using is reading each line then writing it to the excel
spreadsheet. I didn't think it should take 15 minutes to do that. Please help
with tips of reading a text file that can speed up my runs. Thank you in
advance.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
reading from another file and pasting to current file, "combobox" Darius New Users to Excel 1 September 26th 05 07:13 AM
reading data from 2nd file in 1st file using Combobox Darius Excel Programming 0 September 22nd 05 04:51 PM
reading from text file to excel file dgoel Excel Programming 0 April 18th 05 06:49 PM
Reading from ini file Tammy[_4_] Excel Programming 4 February 8th 04 10:11 AM
Reading from file Asif[_3_] Excel Programming 4 November 16th 03 05:28 AM


All times are GMT +1. The time now is 01:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"