ms excel

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » MS Excel

MS Excel

resolvedResolved · Low Priority · Version 2003

Greg has attended:
Excel VBA Intro Intermediate course
Excel VBA Intro Intermediate course

MS Excel

How can I convert an Excel Worksheet list of comma separated values to a tab delimited version?

Edited on Thu 11 Sep 2008, 11:38

RE: MS Excel

Hi Greg

The code below opens an existing (.csv) document in Excel and then saves it as a new (.txt) document

Sub ConvertWorkbook()

Workbooks.Open Filename:= "D:\Documents and Settings\TrainerDev07\Desktop\Sales 2004.csv"

ActiveWorkbook.SaveAs Filename:= "D:\Documents and Settings\TrainerDev07\Desktop\TXTSales 2004.txt", _
FileFormat :=xlText, CreateBackup:=False

End Sub


Hope this helps

Carlos

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Turn off AutoComplete in Excel

You may have noticed when typing into your spreadsheets that if you start to enter labels that begin with the same letters as a label that has been previously entered in the same spreadsheet, Excel will try and automatically complete the text for you. This feature is called AutoComplete.

If you find this feature more annoying than useful, you can turn it off by:

1. Going to Tools - Options.

2. Select the Edit tab.

3. Remove the tick from next to the "Enable AutoComplete for cell values" option.

4. Click OK.

View all Excel hints and tips


Server loaded in 0.08 secs.