Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
V.R.
 
Posts: n/a
Default How to save text as CSV which also contains commas?

How can I save a data file in CSV format when one of the fields contains
commas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default How to save text as CSV which also contains commas?

"V.R." wrote in message
...
How can I save a data file in CSV format when one of the fields contains
commas?


By default, Excel will include double quotes round the contents of such
field, and when importing the csv file it will treat the double quotes as
text delimiters. Save it as CSV, then look at the CSV file with something
like Notepad.
--
David Biddulph


  #3   Report Post  
Posted to microsoft.public.excel.misc
V.R.
 
Posts: n/a
Default How to save text as CSV which also contains commas?

Thanks David.
Opening the file in notepad looks fine.
But, what about if I want to see the data as an excel sheet. Extra commas in
a field shows me extra column. Isn't there a way to avoid this?


"David Biddulph" wrote:

"V.R." wrote in message
...
How can I save a data file in CSV format when one of the fields contains
commas?


By default, Excel will include double quotes round the contents of such
field, and when importing the csv file it will treat the double quotes as
text delimiters. Save it as CSV, then look at the CSV file with something
like Notepad.
--
David Biddulph



  #4   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default How to save text as CSV which also contains commas?

"V.R." wrote in message
...
"David Biddulph" wrote:

"V.R." wrote in message
...
How can I save a data file in CSV format when one of the fields
contains
commas?


By default, Excel will include double quotes round the contents of such
field, and when importing the csv file it will treat the double quotes as
text delimiters. Save it as CSV, then look at the CSV file with
something
like Notepad.


Thanks David.
Opening the file in notepad looks fine.
But, what about if I want to see the data as an excel sheet. Extra commas
in
a field shows me extra column. Isn't there a way to avoid this?


It shouldn't show you the extra column when it reimports. It doesn't for
me.
It might be worth trying renaming the file as a txt rather than csv, then if
you open the file from within Excel you'll hopefully get the wizard & will
be able to ensure that you've got the delimiter set as comma and the text
qualifier as a double quote.

In a recent thread, one contributor was having problems because the double
quote wasn't immediately after the comma (so it was necessary to get rid of
the extraneous spaces before reimporting), or if there were double quotes
within the text field, but in general it should be OK.
--
David Biddulph


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
Why will Excel will not save text format in a .csv file davis Excel Worksheet Functions 1 January 25th 06 05:44 PM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM
Text Wrapping JMB Excel Discussion (Misc queries) 0 July 29th 05 02:41 AM
Autofitting a row Josephine Excel Discussion (Misc queries) 2 March 3rd 05 03:37 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 03:43 AM.

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

About Us

"It's about Microsoft Excel"