LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Exporting from multiple worksheets to single text file

Hi,

I have an Excel file with multiple worksheets (containing over 65,000
rows of data in total). I want to export all the info from all sheets
into a single text file (all the sheets are in the same format).
I can manage to export each sheet into a separate text file using the
following code:

----
Dim SheetCounter As Integer

For SheetCounter = 1 To Sheets.Count
Sheets(SheetCounter).Activate
ChDir "P:\"
ActiveWorkbook.SaveAs filename:= _
"P:\" & ActiveSheet.Name & ".txt" _
, FileFormat:=xlText, CreateBackup:=False
End If
Next
------

Could someone let me know how to export data from multiple sheets into
a single text file.

Many thanks,
Chris Dunigan
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems printing/exporting multiple worksheets with Excel 2007 cwilder Excel Discussion (Misc queries) 0 April 14th 08 06:06 PM
Printing single pages from multiple worksheets in a single print job [email protected] Excel Discussion (Misc queries) 2 April 27th 07 06:11 PM
Printing multiple worksheets to one single pdf file Gene Excel Discussion (Misc queries) 2 December 19th 06 06:32 PM
Single text file imported to multiple worksheets Lynn Bales Excel Worksheet Functions 2 September 21st 06 10:42 PM
Exporting Text File Ray Ray[_2_] Excel Programming 1 August 17th 03 03:33 PM


All times are GMT +1. The time now is 06:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"