Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I save excel text without formatting?

I want to generate a series of small text files, each from the contents of
six cells in one row. I do not want "assistance" from Excel adding quotes or
delimiters. Pasting the contents into Notepad works but it is labor
intensive. How can I do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default How do I save excel text without formatting?

Sub DumpToTxtFile()
' dump Ax:Fx to text file, separated by my delimiter
Dim fName$, dataRow As Integer, x As Integer, s As String
fName$ = "myTxtFile.txt"
Close #2 ' be sure is not already open
On Error GoTo notOpened
Open fName$ For Output As #2
On Error Resume Next

dataRow = 1
s = Cells(dataRow, 1)
For x = 2 To 6
s = s & ", " & Cells(dataRow, x)
Next x
Print #2, s$
notOpened:
Close #2
On Error GoTo 0 ' cancel error handling
End Sub

On Jan 26, 8:55 pm, BruceMcG
wrote:
I want to generate a series of small text files, each from the contents of
six cells in one row. I do not want "assistance" from Excel adding quotes or
delimiters. Pasting the contents into Notepad works but it is labor
intensive. How can I do this?


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
excel save as csv - force text qualifier on every text field Newbie-Don Excel Discussion (Misc queries) 6 April 2nd 23 08:33 PM
why doesn't my formatting changes save in excel 2007 Excel Formatting Excel Discussion (Misc queries) 1 August 29th 09 04:00 AM
Why this error ?: Excel could not save all the data and formatting manxman Excel Discussion (Misc queries) 0 October 4th 06 04:54 PM
excel could not save all the data and formatting Ramil Excel Worksheet Functions 0 July 3rd 06 08:09 AM
Excel cannot save formatting Gerry Bakker Excel Discussion (Misc queries) 1 April 6th 06 02:52 PM


All times are GMT +1. The time now is 11:45 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"