+ Reply to Thread
Results 1 to 9 of 9

Convert Excel to txt base on Selection

  1. #1
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Convert Excel to txt base on Selection

    Hi,
    I have VB Code that convert data in txt file, and its work fine but I need some changes on it.

    1. convert only selected row
    2. choice of selection where to save file.

    Test file attached here..

    Thanks in advance
    Attached Files Attached Files
    My English is very poor, so please be patient >_<"

    Thanks & Regards.
    hkbhansali

  2. #2
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: Convert Excel to txt base on Selection

    Hi Bhansali,

    Try Below Code

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Convert Excel to txt base on Selection

    Hi mohan.r1980,

    Your code not work, its copy row in txt file transpose. and can't select where to save file

  4. #4
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: Convert Excel to txt base on Selection

    Hi Bhansali,

    this code is very fast for output if you add the save choice this will reduce the speed, i think it is better to make a specific folder where output will save.
    like
    Please Login or Register  to view this content.
    rest is as bellow

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Convert Excel to txt base on Selection

    Hi mohan.r1980,

    Your Code work from first rows,

    ie : if I select rows "A7,A8,A9,A10" and run macro, it's copy in txt file rows "A1,A2,A3,A4"

  6. #6
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Convert Excel to txt base on Selection

    Is your test file representative? There is only data in column A. If so, this can work.

    Please Login or Register  to view this content.

    Otherwise place a representative example.

  7. #7
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Convert Excel to txt base on Selection

    Hi Vraag en antwoord,

    Yes, My test file is representative,
    Your code works fine but its replace with "|" , when I want "," (coma deliminated) and also end of row "|" missing.

  8. #8
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Convert Excel to txt base on Selection

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Convert Excel to txt base on Selection

    Hi Vraag en antwoord

    Thanks a lot...it's work perfect...

    is it possible that can browse by option that where to save File?
    Last edited by hkbhansali; 07-29-2018 at 08:08 AM.

+ 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. Excel Form with selection buttons won't convert to PDF
    By axm1955 in forum Excel General
    Replies: 1
    Last Post: 07-26-2016, 10:29 AM
  2. I want date base selection from the other coloums
    By milap9747 in forum Excel General
    Replies: 1
    Last Post: 04-17-2015, 08:28 AM
  3. Convert excel selection to hi-res JPG
    By queencode in forum Excel General
    Replies: 6
    Last Post: 04-15-2015, 11:52 AM
  4. [SOLVED] Excel formula from looking the base date and convert into desire result
    By PRADEEPB270 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-17-2013, 11:43 AM
  5. convert non data base to data base format using formula
    By murarihyd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-22-2011, 11:42 AM
  6. how do I convert numbers to a different base in Excel?
    By henry in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-14-2005, 11:06 AM
  7. [SOLVED] Convert Works 6.0 data base to Excel?
    By CarolER in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-08-2005, 02:06 PM

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