Converting file from XLS to TXT

G

Guest

HI
I am running some code on a txt file than need to save the file as a TXT but
when I open the TXT file I get a " speach mark at the beginnig of random
lines...as on the EG below:
1234556
"2345678
qwert
asdfg
"2asdfg
why does this appen? and what can I do to prevent it?
Thank you
 
G

Guest

Thank you Tom
How could avoid that?
On the excel file I can not see the " and I do not have any commas..
Thank you
 
G

Guest

Hi Tom Thank you again
Well that is the problem
So I have a text file that i need to open in to excel run the below code and
re-save in TXT format:
For Each Cell In Range("A1:A65000")
s = Cell.Value
If Left(s, 1) = "1" Then
i = 208
iloc = InStr(i, s, " ", vbTextCompare)
t = 223
tloc = InStr(t, s, " ", vbTextCompare)

s1 = Left(s, i - 1)
s3 = Right(s, Len(s) - iloc)
s2 = "*************** "
Cell.Value = s1 & s2 & s3

When I re open the file in TXT on random lines I have the " at the begining
of the line:
1234435678
"123456
asdfg
"qwertyuio
But If I look at the file in excel I can not see the " so I can not remove
them.
Can you please help?

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top