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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

editing strange files

Status
Not open for further replies.

dokR

Programmer
Jul 13, 2004
5
0
0
DE
Hi,

I am handling a strange file with many strange characters that I am not the originator of. Objective is to modify some lines of the file without destroying the other ones. Importing into a worksheet does modifications; whereas editing in notepad is OK.
Strange enough the line-by-line copy with VBA is destroying the file.

Q: Is there a better way?
Q2: Is there a way to read one character after the other and not the entire lines?
Q3: Is it possible to open a file for writing and skipping lines that don't fulfil the search, without touching the file; and only delete/insert lines of interest?


Thanks for your help,
dokR
 
Open the file For Binary and then use the Get and Put instructions.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top