+ Reply to Thread
Results 1 to 10 of 10

Need the following file data in txt format

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    15

    Need the following file data in txt format

    the data in excel sheet is

    Capture.JPG
    Policy/Group Number P/G Indicator Start/Stop Indicator
    000123654 P A
    1234567 G Z

    I want a macro to move all the rows except top row(heading row) to a text file
    once the data is moved, need to empty out all rows except top row.

    Your help is much appreciated.
    Last edited by abhikulsh; 01-02-2013 at 07:52 AM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Need the following file data in txt format

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    01-02-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Need the following file data in txt format

    hI Patel

    much thanks for your help.when i run this macro. i get the data as

    0012536256,P,A
    1023654,G,Z

    this data has to be fed into another system.hence commas should not be there
    also the data was a sample.need to delete the complate data not only A2 and A3
    and the data is required in this format in notepad

    0012536256 P A
    1023654 G Z

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Need the following file data in txt format

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-02-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Need the following file data in txt format

    Hi Patel

    Thanks for yourhelp. Actually the output is not coming as expected, its not formatted as in excel, the data is coming distorted ,
    i think its happening coz the data llength in second row is less than in first row, the first column i want shud have value of text length 10, if its less, then it should fill spaces. I guess it will show formatted output after we do this.


    ,so i am attaching the images of notepad file, in the second macro that u gave me the rows do not get deleted after i run the macro

    Much thanks for your help

    Kindly let me know what change to make to this macro so that i get output in same way as its there in excel or the one attached here in notepad. I am giving both how its in excel and how it should be in notepad

    thanks in advance Capture.JPG
    Capture1.JPG
    Attached Images Attached Images
    Last edited by abhikulsh; 01-04-2013 at 08:08 AM.

  6. #6
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Need the following file data in txt format

    no jpg please attach txt

  7. #7
    Registered User
    Join Date
    01-02-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Need the following file data in txt format

    Attached are the sample excel sheet and corresponding text file
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Need the following file data in txt format

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-02-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Need the following file data in txt format

    Hi Patel

    This is just great!! i checked this and it works just as expected, only one thing is missed here that after the macro runs "once the data is moved, need to empty out all rows except top row" from the excel sheet.

    kindly let me know how i can acheive this in the same macro

    I am greatly thankful to you for your help

  10. #10
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Need the following file data in txt format

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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