+ Reply to Thread
Results 1 to 2 of 2

How to convert excel file to .txt file

Hybrid View

miniv How to convert excel file to... 12-05-2013, 09:48 PM
alansidman Re: How to convert excel file... 12-05-2013, 10:03 PM
  1. #1
    Registered User
    Join Date
    08-09-2013
    Location
    CN
    MS-Off Ver
    Excel 2010
    Posts
    1

    How to convert excel file to .txt file

    I need a macro to convert Excel File to .TXT file
    Also, in excel the date format is (yyyy-mm-dd) and it should retain the format after conversion.

    Any thoughts please.


    Thanks

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: How to convert excel file to .txt file

    Try this:

    Sub TXT1()
    Dim path As String
    path = "type your file path here" 'something like "C:\Users\Folder1\subfolder"
        ActiveWorkbook.SaveAs Filename:=path & "\Your file name.txt", _
            FileFormat:=xlText, CreateBackup:=False
    End Sub
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to convert comma delimited csv file to excel file??
    By sanjeevpandey in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-15-2012, 05:31 AM
  2. Replies: 1
    Last Post: 10-04-2012, 08:11 PM
  3. Replies: 2
    Last Post: 07-16-2008, 03:39 PM
  4. Replies: 3
    Last Post: 08-17-2006, 04:25 PM
  5. Replies: 2
    Last Post: 06-27-2005, 08:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1