LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Line Input Not behaving...!

*** Trying to read an External CSV file ***
however Have found the EOL marker in the file is CHR(10) and not
Chr(10)+Chr(13).
The CSV file is from an external Source and i am unable to Change the
Format (EOL character etc.).

Sub Import ( )
CSVLine = 0
CsvFile = Application.GetOpenFilename("Comma Sep Values (*.csv),
*.csv")
Open CsvFile For Input As #1

While Not EOF(1)
Line Input #1, aRecord
' Other Parsing Code Is Here..
' ...
' ...
CSVLine = CSVLine + 1
Wend

Close #1
msgbox Str(CSVLine)+": Lines Read" '*** CSVLine Only ever reaches 1
***

End Sub

Is there another Setting to Change the behaviour of Line Input #1
.... ?
the Lines are not a set length so am unable to read a set number of
Characters etc.

Any Feedback would be Appreciated.
Andrew


 
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
Line Input not finding Chr10 or 13 [email protected] Excel Programming 8 March 17th 07 08:12 PM
Multi line merged cell - adapting to different size input - possible? David Smithz Excel Discussion (Misc queries) 1 June 18th 06 04:21 PM
diagonal line and data input John Excel Discussion (Misc queries) 3 January 25th 06 12:29 AM
line input problem-need to return 5 lines after a string is found festdaddy Excel Programming 3 December 8th 05 04:38 PM
Reads entire *.txt file into string opposed to a desired line by line input. ej_user Excel Programming 3 October 11th 04 07:15 PM


All times are GMT +1. The time now is 06:52 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"