Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Converting file from XLS to TXT

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Converting file from XLS to TXT

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default conevert XLS to TXT

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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default conevert XLS to TXT

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default conevert XLS to TXT

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting XLS file to QIF or to OFX dreamchaser Excel Discussion (Misc queries) 4 April 5th 23 02:59 PM
Converting a CSV file to an Excel file Gordon Biggar New Users to Excel 3 March 26th 09 02:17 PM
Converting Excel file to text delimited file Kiran Veeramallu[_2_] Excel Discussion (Misc queries) 3 May 1st 07 07:04 PM
Converting excel file to tab delimited (txt) file Kusuma Excel Discussion (Misc queries) 1 December 18th 06 08:04 AM
Converting a .wks file to .xls Richard Dear Excel Discussion (Misc queries) 2 May 2nd 06 05:48 AM


All times are GMT +1. The time now is 12:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"