Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Export all sheets to CSV?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tom C. - 18 Jul 2006 21:26 GMT
Excel 2000, workbook with several sheets. Each sheet is set up exactly the
same way so that the cells are constant from sheet to sheet. I want to
export (or, I guess Save As) CSV ALL worksheets at the same time. The only
way I can see that it works is that you have to save each SHEET one at a
time. Is there a way to export to CSV ALL sheets at once? Thanks. -- tom c
Bernie Deitrick - 19 Jul 2006 15:27 GMT
Tom,

You could combine all the sheets into one before doing the SaveAs:  this macro will combine all
sheets, assuming that the data on each sheet starts in cell A1 and is contiguous.

Sub CombineSheets()
Dim mySht As Worksheet
Dim myShtComb As Worksheet

Set myShtComb = Sheets.Add
myShtComb.Name = "Combined"

For Each mySht In ActiveWorkbook.Worksheets
If mySht.Name <> "Combined" Then
mySht.Range("A1").CurrentRegion.Copy _
myShtComb.Range("A65536").End(xlUp)(2)
End If
Next mySht

End Sub

HTH,
Bernie
MS Excel MVP

> Excel 2000, workbook with several sheets. Each sheet is set up exactly the same way so that the
> cells are constant from sheet to sheet. I want to export (or, I guess Save As) CSV ALL worksheets
> at the same time. The only way I can see that it works is that you have to save each SHEET one at
> a time. Is there a way to export to CSV ALL sheets at once? Thanks. -- tom c
Tom C. - 21 Jul 2006 21:17 GMT
Many thanks, Bernie!

> Tom,
>
[quoted text clipped - 28 lines]
>> at a time. Is there a way to export to CSV ALL sheets at once? Thanks. --  
>> tom c

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.