Home > Forum Home > Automating Data Analysis Tasks > Importing Data From multiple Text files > Use the FileSystemObject Share

Use the FileSystemObject

Excel Help for Use The Filesystemobject in Automating Data Analysis Tasks


Forum TopicLogin

Use The Filesystemobject

Rate this:
(3/5 from 1 vote)
HappyYou can read in text files within Excel by using the FileSystemObject in VBA code:
VBA Code:
Sub Read_text_File() Dim oFSO As New FileSystemObject
Dim oFS
Set oFS = oFSO.OpenTextFile(”c:\textfile.TXT”)
Do Until oFS.AtEndOfStream
sText = oFS.ReadLine
'Do here what you need to do with the line of information
Loop
End Sub

 Excel Business Forums Administrator
 Posted by on
 
View Full Post

Find relevant Excel templates and add-ins for Use the FileSystemObject in the