PC Review


Reply
Thread Tools Rate Thread

Converting file from XLS to TXT

 
 
=?Utf-8?B?YWRpYWNj?=
Guest
Posts: n/a
 
      22nd Nov 2006
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      22nd Nov 2006
Those are usually caused by saving as comma delimited and the cell contains a
comma.

--
Regards,
Tom Ogilvy


"adiacc" wrote:

> 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

 
Reply With Quote
 
=?Utf-8?B?YWRpYWNj?=
Guest
Posts: n/a
 
      22nd Nov 2006
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
 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      22nd Nov 2006
show the code that saves the file.

--
Regards,
Tom Ogilvy


"adiacc" wrote:

> 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

 
Reply With Quote
 
=?Utf-8?B?ZGlhY2NpMXN0?=
Guest
Posts: n/a
 
      22nd Nov 2006
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

"Tom Ogilvy" wrote:

> show the code that saves the file.
>
> --
> Regards,
> Tom Ogilvy
>
>
> "adiacc" wrote:
>
> > 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Excel file to text delimited file =?Utf-8?B?S2lyYW4gVmVlcmFtYWxsdQ==?= Microsoft Excel Misc 3 1st May 2007 07:04 PM
Converting AOL email archive file to an Outlook 2003 compatible file J.S. Microsoft Outlook Discussion 2 12th Dec 2006 11:20 AM
Converting an Excel file to fixed length ASCII (text) file =?Utf-8?B?WUkgTWFu?= Microsoft Excel Misc 2 5th Oct 2004 12:00 AM
converting a .avi file back to a .mov file using rad video tools =?Utf-8?B?c2hlcnJp?= Windows XP MovieMaker 1 24th May 2004 03:12 AM
Converting Dataset to a .IND file( dbaseIV index file) Hari Microsoft ADO .NET 0 12th Jul 2003 11:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:47 AM.