Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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? |
#2
![]() |
|||
|
|||
![]()
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 skiier wrote: 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? -- Dave Peterson |
#3
![]() |
|||
|
|||
![]()
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. "Dave Peterson" wrote: 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 skiier wrote: 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? -- Dave Peterson |
#4
![]() |
|||
|
|||
![]()
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. skiier wrote: 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. "Dave Peterson" wrote: 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 skiier wrote: 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? -- Dave Peterson -- Dave Peterson |
#5
![]() |
|||
|
|||
![]()
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. -- Earl Kiosterud www.smokeylake.com "skiier" wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to CANCEL file SAVE PROMPT when MACRO is running? | Excel Discussion (Misc queries) | |||
Bob Phillips followup question on text macro | Excel Discussion (Misc queries) | |||
Text box question | Excel Discussion (Misc queries) | |||
Text box question | Excel Discussion (Misc queries) | |||
How can I make Excel Files save as the text appers in a cell, can. | Excel Discussion (Misc queries) |