Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting text without double quotes 1

Status
Not open for further replies.

vmon

IS-IT--Management
Feb 14, 2002
74
0
0
US
I am creating a text file (csv) and writing text to the file. Is there a way to export text without having my data enclosed in double quotes? Here is what I am trying.

Open "c:\john.txt" For Output As #1

Write #1, Trim(rstExport.Fields("RecTyp"), _
Trim(rstExport.Fields("PoNumber")), _
Trim(rstExport.Fields("Vendor"))


I want file to look like:

H,12345,ACTION

I am getting:

"H","12345","ACTION"

Thanks for your help,
vmon

 
Use 'Print' instead of 'Write'

When you substitute 'Print' you will lose the quotes, but the file will be formatted with TABS between the datafields:

Results:
H 12345 ACTION

Write the Print statement like this to get rid of the tabs:

Print #1, Trim(rstExport.Fields("RecTyp")) & ", " & _
Trim(rstExport.Fields("PoNumber")) & ", " & _
Trim(rstExport.Fields("Vendor"))

Results:
H, 12345, ACTION
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top