Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using Excel VBA to load values from worksheet cells and then writing
these to a .csv file. My problem is that when the CSV is viewed in NOtepad/wordpad, the text field value are enclosed in quotation marks ". When I first did this they were'nt and I can't think what's changed. Also not all text fields appear to have had quotation marks I've tried applying different fomatting on the sheet and saving as .txt rather than .csv but no difference I need to send the file to a guy whose loader can't cope with quotation marks but frankly for the moment I'm stumped. Any ideas? ps the file open line is : Open file_path For Append Access Write As #1 Cheers |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ratty,
use Activesheet.SaveAs("mytextfile.csv",xlCSV) there are a lot of supported exportformats(see help for al supported formats), no need to write this yourself! DM Unseen |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel uses quotes where necessary for clarity in saving CSV files. For
instance, if a cell contains a comma or a quote, quotes would be necessary. If you have a comma in a cell then without quotes any "loader" program would get it wrong wouldn't it? I think you have to find all the characters in your data that triggers Excel adding quotes and eliminate them. -- Jim "Ratty" wrote in message ... | I'm using Excel VBA to load values from worksheet cells and then writing | these to a .csv file. My problem is that when the CSV is viewed in | NOtepad/wordpad, the text field value are enclosed in quotation marks ". | | When I first did this they were'nt and I can't think what's changed. Also | not all text fields appear to have had quotation marks | | I've tried applying different fomatting on the sheet and saving as .txt | rather than .csv but no difference | | I need to send the file to a guy whose loader can't cope with quotation | marks but frankly for the moment I'm stumped. | | Any ideas? | | ps the file open line is : | Open file_path For Append Access Write As #1 | | Cheers |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CSV File and Maintaining Quotation Marks in TXT | Excel Discussion (Misc queries) | |||
Quotation Marks - When and What?? | Excel Discussion (Misc queries) | |||
After exporting how do I remove quotation marks from text cells | Excel Discussion (Misc queries) | |||
eliminating quotation marks when writing to a text file | Excel Programming | |||
eliminating quotation marks when writing to a text file | Excel Programming |