I want to export an Excel file with multiple sheets as a column-delimited CSV file.
The files are exported to CSV when I execute the code, but they are comma delimited rather than column delimited as I export in CSV.
Dim Sheet As Worksheet, SheetName$, MyFilePath$, N&
MyFilePath$ = ActiveWorkbook.path & "\" & _
Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 5)
.ScreenUpdating = False
.DisplayAlerts = False
' End With
On Error Resume Next '<< a folder exists
MkDir (MyFilePath & "_csv") '<< create a folder
For N = 1 To Sheets.Count
SheetName = ActiveSheet.Name
.Name = SheetName
'save book in this folder
.SaveAs ThisWorkbook.path & "\_csv\" & SheetName & ".csv", FileFormat:=xlCSV
.CutCopyMode = False