Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default export excel spreasheet into a text file

I have a worksheet in a workbook that I would like to export out as a text
file and not affect the workbook, and name the text file to save as.
  #2   Report Post  
Posted to microsoft.public.excel.programming
JPW JPW is offline
external usenet poster
 
Posts: 6
Default export excel spreasheet into a text file

By hand?

File - Save As
Under "Save as type:" choose Text (Tab Delimited) or CSV (Comma Delimited)

....or from within a VBA event?

ThisWorkbook.SaveAs Filename:="MyText.txt", FileFormat:=xlTextWindows

"Slinger" wrote in message
...
I have a worksheet in a workbook that I would like to export out as a text
file and not affect the workbook, and name the text file to save as.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default export excel spreasheet into a text file

I would like to automate the task by using a button to do the write to a file
- pretty much a newbie when it comes to VBA

"JPW" wrote:

By hand?

File - Save As
Under "Save as type:" choose Text (Tab Delimited) or CSV (Comma Delimited)

....or from within a VBA event?

ThisWorkbook.SaveAs Filename:="MyText.txt", FileFormat:=xlTextWindows

"Slinger" wrote in message
...
I have a worksheet in a workbook that I would like to export out as a text
file and not affect the workbook, and name the text file to save as.




  #4   Report Post  
Posted to microsoft.public.excel.programming
JPW JPW is offline
external usenet poster
 
Posts: 6
Default export excel spreasheet into a text file

Double-click on ThisWorkbook in your VBA Project and add a sub with the line
I gave you below. For example:

Public Sub SaveAsTXT()
ThisWorkbook.SaveAs Filename:="MyText.txt", FileFormat:=xlTextWindows
End Sub

Then assign this macro to the button you want from within your workbook. You
can assign macros to pictures, this would be the simplest way. Right-click
your image and choose "Assign Macro," then pick your SaveAsTXT macro from
the list.

"Slinjger" wrote in message
...
I would like to automate the task by using a button to do the write to a
file
- pretty much a newbie when it comes to VBA

"JPW" wrote:

By hand?

File - Save As
Under "Save as type:" choose Text (Tab Delimited) or CSV (Comma
Delimited)

....or from within a VBA event?

ThisWorkbook.SaveAs Filename:="MyText.txt", FileFormat:=xlTextWindows

"Slinger" wrote in message
...
I have a worksheet in a workbook that I would like to export out as a
text
file and not affect the workbook, and name the text file to save as.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default export excel spreasheet into a text file

Not sure I understand the question.

All you have to do is select File, Save as, then choose .CSV type in the
save as type drop down....

The .csv format is a text file. If you need to you can just change the
extension once you saved it down..

Is that what you meant?

"Slinger" wrote:

I have a worksheet in a workbook that I would like to export out as a text
file and not affect the workbook, and name the text file to save as.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 268
Default export excel spreasheet into a text file

Hi Slinger

Activate the sheet you want to save. click on File|Save As. Select a CSV
or other text file format, name it and save. It only saves the one sheet,
without affecting the others. It also changes the name of the sheet to the
saved name. You can just change this back

"Slinger" wrote:

I have a worksheet in a workbook that I would like to export out as a text
file and not affect the workbook, and name the text file to save as.

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 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 as csv with text delimiter of " John Excel Discussion (Misc queries) 2 May 12th 05 05:50 PM
Export excel file to semicolon delimited text file capitan Excel Discussion (Misc queries) 5 April 7th 05 03:06 AM
How can I export cell content in Excel to a text file? documentum_dan Excel Programming 1 February 7th 05 05:16 PM
export a text file which more than 65536 rows into excel Navin Excel Programming 2 November 19th 03 10:55 PM


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

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

About Us

"It's about Microsoft Excel"