Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear All,
I waNt to connect to a text file in the memmory so i can read line by line in the memmory to test a certain conditions and to trim from it and i do these opeartions i want to get these procced data to an exile file optional : if i can use the open dialog tool to open a file with certain condition Tanks For Your Cooperation |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't know how your data are arranged in your text file so the macro below
assumes strings of text. You will have to alter this to suit your needs. Sub getdata() Filename = Application.GetOpenFilename If Filename = "False" Then Exit Sub x = 1 Open Filename For Input As #1 Do While Not EOF(1) Input #1, Line$ bitiwant$ = Mid$(Line$, 4, 4) anotherbitiwant$ = Mid$(Line$, 31, 22) Worksheets("Sheet1").Cells(x, 1).Value = bitiwant$ Worksheets("sheet1").Cells(x, 2).Value = anotherbitiwant$ x = x + 1 Loop Close #1 End Sub Mike "Import Text File" wrote: Dear All, I waNt to connect to a text file in the memmory so i can read line by line in the memmory to test a certain conditions and to trim from it and i do these opeartions i want to get these procced data to an exile file optional : if i can use the open dialog tool to open a file with certain condition Tanks For Your Cooperation |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing CSV file (saved as Text) into XL as Text -- over 60 colu | Excel Discussion (Misc queries) | |||
Importing TEXT file from web | Excel Programming | |||
Importing text file, only option to edit existing file | Excel Discussion (Misc queries) | |||
Importing text file | Excel Discussion (Misc queries) | |||
importing text file, removing data and outputting new text file | Excel Programming |