save as text question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet that is comprised of a single column but thousands of
rows. The width of each cell is 80 characters. I am saveing the file as
text (MS-DOS). The problem that I encounter occurs when the cell contains a
comma. The resulting text file inserts double quotes at the beginning and
end of the line that contained the comma. Why does this occur and how do I
prevent this?
 
If you want more control on how your text file is created, maybe you can use a
macro:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

======
Earl's may be sufficient right out of the box. He supports lots of options.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Maybe I should have provided some more information.

The file is generated by Crystal Reports 9. Users need a text version of
the output. Exporting to Word, Rich Text, and Acrobat then saving as text
all leave page breaks. Exporting to Excel then saving as text works great,
except for this issue with commas.
 
I don't think the extra info helped.

If excel doesn't behave the way you want it to behave, you'll either have to
live with it or find an alternative. In this case, one of the alternatives is
to write your own macro that does the exporting.

Another alternative maybe to clean up the text file after you save it--but that
could be more complex.
 
Skieer,

The quotes when there's a comma in your file are normal. If you want the
details on that, read "Text files and Excel" at www.smokeylake.com/excel.
You could use the "Space delimited *.prn) format, but I'm not sure you'll
get 80 characters if the cell contains less. Failing that, since you know
you have only one column, thus don't need the quote marks, try saving the
sheet with the Text Write Program (same site). In sheet Setup, leave the
text qualifier box empty -- it won't put quote marks around the field if
there isn't one.

Incidentally, here's my standard blurb on the term "double quotes."

A quotation mark (") is often called a "double-quote" by computer types. An
apostrophe (') is similarly called a "single quote." To the best of our
knowledge, no other species behaves in this way -- just computer types. The
problem with this highly esoteric terminology is that there are cases where
two quotation marks in a row are used (such as to represent a single
quotation mark within a text string that's wrapped in quotation marks).
Thus, "double-quote" is ambiguous. And an apostrophe just ain't a quote
mark of any kind. Note the apostrophe in "ain't," which is in quote marks.
 

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

Back
Top