Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Export an excel file as text without change of document type

Hello,

I'm using excel to generate quite large text files. I want to save
automatically from a VB script the result of an excel sheet in a text
file. But using the "save as" function changes the document type of my
excel sheet.

Is there any option to just export the text file and leaving the Excel
sheet as it is?

Yours

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Export an excel file as text without change of document type

ActiveSheet.copy
ActiveWorkbook.SaveAs "C:\MyFolder\MyFile.txt", xlCSV
Activeworkbook.Close SaveChanges:=False

Change xlCSV to the type of text file you want.
--
Regards,
Tom Ogilvy

"Michael" wrote in message
om...
Hello,

I'm using excel to generate quite large text files. I want to save
automatically from a VB script the result of an excel sheet in a text
file. But using the "save as" function changes the document type of my
excel sheet.

Is there any option to just export the text file and leaving the Excel
sheet as it is?

Yours

Michael



Reply
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
how do you change pdf file to excel document? Rachel New Users to Excel 2 December 15th 06 04:23 AM
How do you save an excel file to be read as IBM-type text file ? Dee Franklin Excel Worksheet Functions 2 October 10th 06 02:46 AM
how to export a file to my documents as XML data type Paul Excel Discussion (Misc queries) 0 September 21st 06 08:33 PM
How can I export text from excel autoshapes to a text file? Donncha Excel Discussion (Misc queries) 0 July 20th 06 04:58 PM
Export excel file to semicolon delimited text file capitan Excel Discussion (Misc queries) 5 April 7th 05 03:06 AM


All times are GMT +1. The time now is 01:54 PM.

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"