![]() |
Quotes in a csv file
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 |
Quotes in a csv file
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 |
Quotes in a csv file
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 |
All times are GMT +1. The time now is 11:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com