Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

ms excel

ResolvedVersion 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:

Checking if a calculation adheres to Order of Precedence

When writing formulas you must make sure that results will be calculated as you intended.

Excel adheres to the standard order of precedence for calculations. It calculates percentages, exponents, multiplication, and division in this order before calculating addition and subtraction.

For example, =7+5*3 results in an answer of 22, not 36.

To force a calculation to be completed before another calculations, place the section in parentheses: =(7+5)*3 will result in 36.

To check how excel is evaluating a formula, click on the cell and select the 'Tools' menu, select 'Formula Auditing' and click 'Evaluate Formula'

In the dialog box click on 'Evaluate' to watch as each part of the formula is successively calculated.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.