save as text file creates unwanted quotes

A

arentsch

I have a worksheet that when saved as a text file using
the "tab delimented .txt", quotation marks appear around
some of the strings. These quotation marks do not show up
in Excel, only in the text file. If I retype one of these
lines of text in Excel, the quotations do not show up on
the next text file saved. It appears as if it is some
formatting that I cannot see in excel that is extracted
when saved as a text file. Can anyone help?
 
G

Guest

Do you have commas in your data? If there is a cell with a comma in it, Excel will put quotes around the data, so that when a csv parser reads it, it recognizes that the comma is data and not a delimiter.

For instance, if your spreadsheet looked like
Tom 2,000 Jan9,200
May 860 Jan12,200

If it didn't put the quotes in, it would misinterpret the , in 2000 as well as the commas in the date, and your resulting spreadsheet would look like
Tom 2 000 Jan9 200
May 860 Jan12 200

etc..

The easy solution would be to remove commas from your data in the spreadsheet. If that's not possible, can you use tabs or some other delimiter

Hope that helps
Dante Gagn
SDE/
Developer Divisio
Microsoft Corporatio

This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

-----Original Message-----
Do you have commas in your data? If there is a cell with
a comma in it, Excel will put quotes around the data, so
that when a csv parser reads it, it recognizes that the
comma is data and not a delimiter.
For instance, if your spreadsheet looked like:
Tom 2,000 Jan9,2003
May 860 Jan12,2004

If it didn't put the quotes in, it would misinterpret
the , in 2000 as well as the commas in the date, and your
resulting spreadsheet would look like:
Tom 2 000 Jan9 2003
May 860 Jan12 2004

etc...

The easy solution would be to remove commas from your
data in the spreadsheet. If that's not possible, can you
use tabs or some other delimiter?
Hope that helps,
Dante Gagne
SDE/T
Developer Division
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
.
You're absolutely right! The punctuation is causing the
quotations.

This is an example of a section of my worksheet:(1 column)
1
34
2
mtext
LINE "A" CONVEYOR MOTOR, 10HP
0
1

This is how the text file ends up:
1
34
2
mtext
"LINE ""A"" CONVEYOR MOTOR, 10HP"
0
1

Do you know of a way to save as a text file with line
delimiters only? Each row on the spread sheet needs to be
one line on the text file with no other delimeters.

This is all being coded with VB if your wondering why I
don't just cut and paste.

Thanks again!


are a typical line in the spread sheet:

Line
 

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