Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting multiple worksheets as CSV
I'm looking for a way to automatically export multiple worksheets as
CSV. I have some code that will export the Active Sheet. I'm not looking for fancy renaming - I basically just need to turn each worksheet in an XLS file into its own CSV file. Has anyone already done this? Thanks Joe |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting multiple worksheets as CSV
I bet lots of people have a version that did what you asked. Here's one:
Option Explicit Sub testme() Dim newWks As Worksheet Dim wks As Worksheet For Each wks In ActiveWorkbook.Worksheets wks.Copy 'to a new workbook Set newWks = ActiveSheet With newWks .SaveAs Filename:="C:\temp\" & wks.Name, FileFormat:=xlCSV .Parent.Close savechanges:=False End With Next wks MsgBox "done with: " & ActiveWorkbook.Name End Sub Joe Sheehan wrote: I'm looking for a way to automatically export multiple worksheets as CSV. I have some code that will export the Active Sheet. I'm not looking for fancy renaming - I basically just need to turn each worksheet in an XLS file into its own CSV file. Has anyone already done this? Thanks Joe -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting multiple worksheets as CSV
I'm a complete newbie at this stuff...how would you edit this script so it only exports a "target" sheet as a CSV? So instead of multiples, it only exports one. Thanks, Mike *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting multiple worksheets as CSV
I'm a newbie at this...how would you change that script to make it work if you wanted to "target" the sheet you wanted to export as CSV? Basically, instead of multiple sheets, just the sheet you want. Thanks! Mike *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problems printing/exporting multiple worksheets with Excel 2007 | Excel Discussion (Misc queries) | |||
Exporting multiple sheets to multiple htm files? | Excel Discussion (Misc queries) | |||
Exporting Access data to different worksheets on the same workbook | Excel Programming | |||
Help exporting worksheets/data to a workbook. | Excel Programming | |||
Exporting from multiple worksheets to single text file | Excel Programming |