General discussion

Locked

export xls to csv

By pm ·
Hi,

I'm looking for a macro in excel that lets me export to csv.
The filename must be the name of the sheet combined with the month and year on the moment of export.
Can somebody help me out? I've been searching for a few hours but no luck so far.

Kind regards,
PM.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by rkuhn In reply to export xls to csv

Might take a bit tweaking like where you want to save the file (I used the desktop of my profile) and the time/date format (I just used dd-mm-yyyy) but that's your basic code.


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/2/2006 by rickk
'
' Keyboard Shortcut: Ctrl+p
'
ChDir "C:\Documents and Settings\rickk\Desktop"
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\rickk\Desktop\" & ActiveSheet.Name & " " & Format(Date, "dd-mm-yyyy"), _
FileFormat:=xlCSV, CreateBackup:=False
End Sub

Collapse -

Convert XLS to CSV

by xlstocsv In reply to export xls to csv

You can easily do that, check the info here, free!

http://www.xlstocsv.com

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Forums