How to save excel worksheet in .txt format fast?

M

MaxS

Hi all,

probably a very simple problem but I still do not know how to do it:

I need to save (via VBA) several worksheets from a rather big Excel
workbook, each one of them in as separate *.txt file. Currently this
is done by programmatically executing "Save As" command and selecting
"Save as type *.txt".

Now, this does the job OK but is rather slow and I need to repeat it
many times. Is there a way to export a single worksheet to *.txt
without saving a huge *.xls file ? Or any other way to make the
procedure run faster?

Thank you!

Max
 
J

Jim May

Using the Macro Recorder I produced:
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\XlsFileSavedAsText.txt", _
FileFormat:=xlText, CreateBackup:=False
 
M

MaxS

Thanks Jim.

I am currently doing exactly what you mentioned in your suggestion but
it is slow.
Was wondering if there are other ways..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top