How to create tab delimitted text files?

G

Guest

I have converted .xls file to .txt using TransferText method
But my text file is a comma delimitted file(A mess).
I want to make it tab delimitted.
How should I do this?

THis is my code:

'converted to an text file
DoCmd.TransferText acExportDelim, TableName:="Sheet1",
fileName:="\\melapp01\CCC\Data\ACT\Customers\" & XLSfileName & ".txt",
hasfieldnames:=True

newTextFileName = XLSfileName & ".txt"
' newCSVFileName = Replace(XLSfileName, ".xls", ".csv")

filePath = "\\melapp01\CCC\Data\ACT\Customers\" & newTextFileName
loadDate = Format(DateValue(Me.txtLoadDate), "dd/mm/yyyy")

strSQL = "EXEC sp_BulkLoad '" & filePath & "','" & loadDate & "'"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top