Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how do I remove quotation marks from .CSV file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default how do I remove quotation marks from .CSV file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default how do I remove quotation marks from .CSV file

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
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
CSV File and Maintaining Quotation Marks in TXT rammstein Excel Discussion (Misc queries) 0 February 23rd 06 10:18 PM
Quotation Marks - When and What?? heski Excel Discussion (Misc queries) 2 February 7th 06 12:40 PM
After exporting how do I remove quotation marks from text cells Marty G Excel Discussion (Misc queries) 0 July 29th 05 02:54 AM
eliminating quotation marks when writing to a text file margrabe[_2_] Excel Programming 5 February 10th 04 03:27 AM
eliminating quotation marks when writing to a text file margrabe Excel Programming 0 February 9th 04 04:21 PM


All times are GMT +1. The time now is 08:37 PM.

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"