Forum Discussion
LauraDaisy
Feb 24, 2023Copper Contributor
Split data - save to csv file
I am VBA code to split data in my excel spreadsheet.
What code can I add to automatically save it in to a csv. file? It is currently saving to Microsoft Excel 97-2003 Worksheet (.xls).
Try
.SaveAs FileName:=ACS.Parent.Parent.Path & Application.PathSeparator & "file-" & Z & ".csv", FileFormat:=xlCSV
- LauraDaisyCopper Contributor
cheers this is great - but its changed the format of the date. Any way to stop this from happening?
Can it save direct to the folder rather than opening once created?
LauraDaisy You'd probably have to use a column with formulas of the form
=TEXT(datecell, "desiredformat")
I don't understand your question "Can it save direct to the folder rather than opening once created?"