Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Export Areas
Is it possible to export certain areas from Sheets in a workbook
automatically to single .CSV Files with the name of the sheet ? E.G.: The Range A:5 - Z:89 for the Sheets named Argentina, Austria,... should produce .CSV Files named : Argentina.csv, Austria.csv ...... |
#2
|
|||
|
|||
Start recording a macro and do it manually once. then next time just run that
macro. You will find record macros in ToolsMacro "Michael MacLachlan" wrote: Is it possible to export certain areas from Sheets in a workbook automatically to single .CSV Files with the name of the sheet ? E.G.: The Range A:5 - Z:89 for the Sheets named Argentina, Austria,... should produce .CSV Files named : Argentina.csv, Austria.csv ...... |
#3
|
|||
|
|||
How do you know which worksheets to copy?
If you can copy all the worksheets in the workbook, then you could use code like: Option Explicit Sub testme() Dim wks As Worksheet Dim newWks As Worksheet For Each wks In ActiveWorkbook.Worksheets 'or use this for your selected sheets 'For Each wks In ActiveWindow.SelectedSheets Set newWks = Workbooks.Add(1).Worksheets(1) wks.Range("a5:z89").Copy _ Destination:=newWks.Range("a1") With newWks Application.DisplayAlerts = False .Parent.SaveAs Filename:="C:\WINDOWS\TEMP\" & wks.Name, _ FileFormat:=xlCSV Application.DisplayAlerts = True .Parent.Close savechanges:=False End With Next wks End Sub If you have to ignore some of the worksheets, maybe you could group the sheets (click on the first worksheet tab and ctrl-click on subsequent), then uncomment the activewindow line and comment the activeworkbook line. For Each wks In ActiveWorkbook.Worksheets 'or use this for your selected sheets 'For Each wks In ActiveWindow.SelectedSheets Michael MacLachlan wrote: Is it possible to export certain areas from Sheets in a workbook automatically to single .CSV Files with the name of the sheet ? E.G.: The Range A:5 - Z:89 for the Sheets named Argentina, Austria,... should produce .CSV Files named : Argentina.csv, Austria.csv ...... -- Dave Peterson |
#4
|
|||
|
|||
And don't forget to adjust the path to an existing folder.
If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Michael MacLachlan wrote: Is it possible to export certain areas from Sheets in a workbook automatically to single .CSV Files with the name of the sheet ? E.G.: The Range A:5 - Z:89 for the Sheets named Argentina, Austria,... should produce .CSV Files named : Argentina.csv, Austria.csv ...... -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I set my Excel Chart to not show areas where I have no dat. | Charts and Charting in Excel | |||
how do I export an Excel graph to an encapsulated postscript (.ep. | Charts and Charting in Excel | |||
how do allow two charts with two different chart areas? | Charts and Charting in Excel | |||
export chart - size problem | Charts and Charting in Excel | |||
Chart appearance using "export" method | Charts and Charting in Excel |