Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Data into Excel

Status
Not open for further replies.

kamhcl

IS-IT--Management
Sep 25, 2001
2
GB
I have some raw data produced by another application. It is a series of fixed length fields which add up to a string about 1000 characters long (some of which can be null). When I try to import it into Excel (v. 97) it will only bring in the first couple of hundred characters (at a guess it might be 256, but I can't be bothered to count!). Has anyone got any ideas as to how I might get round this?
Thanks in advance

Kevin
 
try it..
Sub InportTxt()
Dim sTxt As String, i As Long
Open ("C:\non.txt") For Input As #1
i = 0
Do While Not EOF(1)
Line Input #1, sTxt
ActiveCell.Offset(i, 0) = sTxt
i = i + 1
Loop
Close #1
End Sub
 
ide

Excellent. Worked first time.

You have saved me a lot of time

Thank-you very much

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top