View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Robgrant Robgrant is offline
external usenet poster
 
Posts: 5
Default batch convert worksheets in one workbook into csv files?

I adjusted the path to D:\CSVDATA
I get stuck on line starting: wks.copy

Can you give me a little more information? I'm rather new at this.

Thanks
"Ron de Bruin" wrote in message
...
Hi Robgrant

Try this

You can save every sheet then as a CSV file with a loop
Dave Peterson posted this macro to save each sheet as a CSV

Sub testme()
Dim wks As Worksheet
Dim newWks As Worksheet

For Each wks In ActiveWorkbook.Worksheets
wks.Copy 'copies to a new workbook
With ActiveSheet
.Parent.SaveAs Filename:="C:\WINDOWS\TEMP\" & .Name, _
FileFormat:=xlCSV
.Parent.Close savechanges:=False
End With
Next wks

End Sub

(adjust the path)



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Robgrant" wrote in message
...
Is there a way to batch convert many worksheets, contained in one
workbook, into individual csv files?

Thanks