Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Scratch the part about xlTextWindows, it does save using the quotes. Sorry.
"Buster" wrote: I was unable to find a solution that would directly export a range, but I have a workaround you might try. Code the macro to insert a new worksheet and copy/paste-values the range to export to the new worksheet's A1. Export the new worksheet using FileFormat property xlTextWindows then delete the inserted worksheet. [I used xlTextWindows as does not the add quote marks like xlTextMSDOS.] It may not be graceful, but it does what you want. " wrote: Greetings experts... Is it possible to export the contents of a specified range to a text file? The worksheet will be protected and the cells locked. The range to export will always be the same. The user will not select the range, the range should already be defined in the macro. The macro should not save the entire workbook or worksheet as a text file, nor should it export the entire workbook or worksheet to a text file, nor should it prompt the user for any input whatsoever. Simply the contents of range $A:$5: $B:$20 ---- text file. I searched and searched for a known solution, but could not find one, hence my post here. If a delimiter is required, a simple space or tab will suffice. Thanks kindly. (Please note: I reviewed the excellent work of Pearson, Patterson, Peo, Max, and others, but their examples are not quite what I need, and I'm unsure of how to modify their examples to fit my needs.) J |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Export range to text file | Excel Discussion (Misc queries) | |||
Export excel file to semicolon delimited text file | Excel Discussion (Misc queries) | |||
How do I import text file, analyze data, export results, open next file | Excel Programming | |||
Export range to text file | Excel Programming | |||
Macro to Create text file from range of cells? | Excel Programming |