Export to CSV with ; not ,

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I use the following export code to export from access 2003 to a CSV file,
but after this I need to import the file to a website and the website only
accepts the seperator ; but what I try I always can the commaseparator (,)
Can someone please help me how to get an ; as separator.

The code:

Public Function Export()

On Error GoTo Err_export1
Dim AString As String
AString = "Import"
DoCmd.TransferText acExportDelim, "", "csv", "c:\import\export\" & AString &
Format(Date, "_DDMM") & ".csv"
Exit_export1:
Exit Function
Err_export1:
MsgBox Err.Description
Resume Exit_export1

End Function


Please help me !!
 
Create an export specification (do the export manually, click on the
Advanced button in the wizard window, and save the settings -- with ; as the
delimiter) with a name such as SemiColonExport. Then use the export
specification name as the second argument in your TransferText step:

DoCmd.TransferText acExportDelim, "SemiColonExport", "csv",
"c:\import\export\" & AString &
Format(Date, "_DDMM") & ".csv"
 
Manually do an export. When the Export Text Wizard pops up, go to the
Advanced button on the lower left. You will find an option for changing the
field delimiter to a ";" . Do a Save As to a name like SemicolonCSV. Modify
your code like so to use this export specification:

DoCmd.TransferText acExportDelim, "SemicolonCSV", "csv",
"c:\import\export\" & AString & Format(Date, "_DDMM") & ".csv"
 
Thanks !!! it works !!

Ken Snell (MVP) said:
Create an export specification (do the export manually, click on the
Advanced button in the wizard window, and save the settings -- with ; as the
delimiter) with a name such as SemiColonExport. Then use the export
specification name as the second argument in your TransferText step:

DoCmd.TransferText acExportDelim, "SemiColonExport", "csv",
"c:\import\export\" & AString &
Format(Date, "_DDMM") & ".csv"
 
Back
Top