Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel 2000 Hanging while reading large file with Line Input



Line Input #1, Inbuf
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel 2000 Hanging while reading large file with Line Input

Sorry something went wrong with my initial input. It should have been ...

I'm using a VB Code that reads large files to produce statistics. It Works with
Excel under NT 4 With an input file of 232 MB. With Excel 2000 under XP it remain
stuck on the first Line input instruction. However with the same input file truncate
to 10 MB it works perfectly. I suspect some setup problem (buffer size somewhere
the code is as follows

Open InvFile For Input As #1 ' Open Input fil

Do While Not Fin
Line Input #1, Inbu
...........

Any help would be highly appreciate
Regard
Jacques Brun
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel 2000 Hanging while reading large file with Line Input

Open InvFile For Input As #1 ' Open Input file

Do While Not Eof(1)
Line Input #1, Inbuf
Loop

is the usual way to write this.

--
Regards,
Tom Ogilvy



"Jacques Brun" wrote in message
...
Sorry something went wrong with my initial input. It should have been ...

I'm using a VB Code that reads large files to produce statistics. It Works

with
Excel under NT 4 With an input file of 232 MB. With Excel 2000 under XP it

remains
stuck on the first Line input instruction. However with the same input

file truncated
to 10 MB it works perfectly. I suspect some setup problem (buffer size

somewhere)
the code is as follows:

Open InvFile For Input As #1 ' Open Input file

Do While Not Fini
Line Input #1, Inbuf
............

Any help would be highly appreciated
Regards
Jacques Brun



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel 2000 Hanging while reading large file with Line Input

My input was unclear. To clarify
"Fini" is a boolean depending on EOF(1) and other conditions
When I use a breakpoint and step by step execution Excel hangs
when going to the "Line input #1, Inbuf" . The first execution
of this line of code is never ending. With the same input fil
truncated to 10 MB the program works as intended ... So
suspect that the cause is the size of the input file (232 MB)
and some Excel setup somewhere

Jacques Bru

----- Tom Ogilvy wrote: ----

Open InvFile For Input As #1 ' Open Input fil

Do While Not Eof(1
Line Input #1, Inbu
Loo

is the usual way to write this

--
Regards
Tom Ogilv



"Jacques Brun" wrote in messag
..
Sorry something went wrong with my initial input. It should have been ..
I'm using a VB Code that reads large files to produce statistics. It Work

wit
Excel under NT 4 With an input file of 232 MB. With Excel 2000 under XP i

remain
stuck on the first Line input instruction. However with the same inpu

file truncate
to 10 MB it works perfectly. I suspect some setup problem (buffer siz

somewhere
the code is as follows
Open InvFile For Input As #1 ' Open Input fil
Do While Not Fin

Line Input #1, Inbu
...........
Any help would be highly appreciate

Regard
Jacques Bru




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel 2000 Hanging while reading large file with Line Input

If it chokes on the first visit to Line Input then I suspect your file isn't
really structured to use line input - if it isn't a text file with vbCRLf at
the end of each line and the lines of some reasonable length, then perhaps
that is the source of the problem. You might need to use one of the other
commands besides Line Input and read it in in pieces. If it does meet the
description above, then the size of the file should not be a restriction I
don't believe, because reading in one line at a time should be possible.

--
Regards,
Tom Ogilvy

"Jacques Brun" wrote in message
...
My input was unclear. To clarify :
"Fini" is a boolean depending on EOF(1) and other conditions.
When I use a breakpoint and step by step execution Excel hangs
when going to the "Line input #1, Inbuf" . The first execution
of this line of code is never ending. With the same input file
truncated to 10 MB the program works as intended ... So I
suspect that the cause is the size of the input file (232 MB)
and some Excel setup somewhere.

Jacques Brun

----- Tom Ogilvy wrote: -----

Open InvFile For Input As #1 ' Open Input file

Do While Not Eof(1)
Line Input #1, Inbuf
Loop

is the usual way to write this.

--
Regards,
Tom Ogilvy



"Jacques Brun" wrote in message
...
Sorry something went wrong with my initial input. It should have

been ...
I'm using a VB Code that reads large files to produce statistics.

It Works
with
Excel under NT 4 With an input file of 232 MB. With Excel 2000

under XP it
remains
stuck on the first Line input instruction. However with the same

input
file truncated
to 10 MB it works perfectly. I suspect some setup problem (buffer

size
somewhere)
the code is as follows:
Open InvFile For Input As #1 ' Open Input

file
Do While Not Fini

Line Input #1, Inbuf
............
Any help would be highly appreciated

Regards
Jacques Brun






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
VBA macro for reading text file into Excel Javed Khan Excel Discussion (Misc queries) 0 October 14th 09 06:29 PM
Reading SQL Table into Excel and calculating/inserting group line (with VBA)? Claudia d'Amato Excel Discussion (Misc queries) 2 January 11th 09 02:53 PM
Reading a large DBF JayWind Excel Discussion (Misc queries) 3 June 15th 06 09:17 AM
Hyperlink in Excel 2000 can't open bookmarked Word 2000 file DCheslock Excel Discussion (Misc queries) 1 May 5th 05 10:46 PM
Reading an Excel file after upload Quan[_2_] Excel Programming 0 November 6th 03 12:12 AM


All times are GMT +1. The time now is 08:42 AM.

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

About Us

"It's about Microsoft Excel"