Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel file that i run a marco against and it will save it as a csv
type file (with a different extension). The problem is that some of my cells have commas in them. When i open the saved file in Notepad, Excel has put double quotes around any cell values that have commas in them. Other than the quotes the notepad file looks perfect. Is there a way to get those out of there? Her is the part of my code that saves the file if that helps any. ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\dlefler\Desktop\" & PoId & ".otto", FileFormat:=xlTextMSDOS, _ CreateBackup:=False |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You have a problem. A CSV file either cannot have commas in the data or
you need to add character to indicate what are real commas and which are the commas you need to seperate the columns. the two normal choices are to put twosets of commas in the CSV file when you have commas in the cell (not the ones seperating the columns" or to put double quortes around the data like excel has done with your file. -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157300 Microsoft Office Help |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Wed, 25 Nov 2009 20:50:35 +0000, joel
wrote: You have a problem. A CSV file either cannot have commas in the data or you need to add character to indicate what are real commas and which are the commas you need to seperate the columns. the two normal choices are to put twosets of commas in the CSV file when you have commas in the cell (not the ones seperating the columns" or to put double quortes around the data like excel has done with your file. Joel and Dave thank you for your posts. I had the same exact problem a few weeks ago and my web searching turned up no insight about what was causing my data to be quoted. Now I understand, thank you! DUH, csv = COMMA separated values John Keith |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have often written macros for people that saves data without quotes or read data with quotes where excel VBA idd handle the data properly. I open the CSV file as a text file and then read/write the data one line at a time. but this case it is impossible since there are commas in the data. -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157300 Microsoft Office Help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Double quotes when exporting to tab delimited file | Excel Discussion (Misc queries) | |||
change straight quotes to curly quotes | Excel Discussion (Misc queries) | |||
Why Saving a file to a CSV, Excel does not put text into Quotes? | Excel Discussion (Misc queries) | |||
CSV File with double quotes | Excel Programming | |||
why are there quotes in my exported text file? | Excel Discussion (Misc queries) |