Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBscript that create textfile from xcel workbook

Status
Not open for further replies.
Jan 28, 2004
19
US
I have an Xcel workbook with multiple columns of which I would like to save as textfile. I tried save as from the file menu but the layout in the file saved is all over the place.

Is there a VBscript I could use to read all the columns and create A Text-File that have the proper layout?

Thanks again for your help...
 
When you saved it as a text file did you click yes at the second msgbox which asks you if you want to keep tab delimited format? That should keep the columns in the layout you had in Excel for you.

Hope this helps

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.

 


Hi,

I tried save as from the file menu but the layout in the file saved is all over the place.

Do you mean that you want the order of the columns in the text file, changed? If so, use MS Query on a new sheet to display whatever columns in whatever order you want. Then SaveAs a text file.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top