Saves the active worksheet in the workbook named MyWorkbook.xls as a comma-delimited text file named test.csv: : CSV « File Path « VBA / Excel / Access / Word






Saves the active worksheet in the workbook named MyWorkbook.xls as a comma-delimited text file named test.csv:

 
Sub csvSave()
    Workbooks("MyWorkbook.xls").SaveAs Filename:=ActiveWorkbook.Path & _
              "\test.csv", FileFormat:=xlCSV
End Sub

 








Related examples in the same category

1.Query text file
2.Split demonstration
3.Brings up a dialog box that asks the user for a filename.
4.Create text file based database
5.Export active worksheet to CSV file