+ Reply to Thread
Results 1 to 17 of 17

Conversion of text files without change in the original file

  1. #1
    Registered User
    Join Date
    07-25-2010
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    48

    Smile Conversion of text files without change in the original file

    Hi,

    I need to add a leading zero before month in a text file, but the spacing should same as before after adding the zero also.

    I tries using to open with excel and changed the format but after i did the test to columns the spacing of the old format is changed.

    Ex:

    BUARDC 04294008295 010321 6000 7/17/2010 0000354652 000224

    This is the sample data, in this i need to add zero before that "7". but the format should be same like the spacing between the letters and all the numbers also.

    Can anyone help me on this i can solve this issue.

    Thanks in advance

    Vinoth
    Last edited by vinwin06; 08-13-2010 at 08:32 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conversion of text files without change in the original file

    this not clear! where is your original data. text file or excel? where do you want to put the corrected data when done?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    07-25-2010
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Conversion of text files without change in the original file

    Hai,

    the input file should be in text and also the output also in text format only.

    I will attach the file for your reference.
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conversion of text files without change in the original file

    just do it in note pad you'd have to repeat for 1,2,3,4,5,6,7,8,9
    find " 7/" replace " 07/" note the leading space in both cases

  5. #5
    Registered User
    Join Date
    07-25-2010
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Conversion of text files without change in the original file

    Thanks for the response Martin.

    I want to know if there is any macro coding for this to convert into excel and convert back into note pad again.

    If there is any macro for text pad to run this same kind of conversion.

    Your help will be greatly appreciated.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conversion of text files without change in the original file

    i doubt if excel could do it as when imported it removes unnecessary spaces
    notepad definitely no
    but ms word vba might do it.

  7. #7
    Registered User
    Join Date
    07-25-2010
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Conversion of text files without change in the original file

    May i how ms word can do this process.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conversion of text files without change in the original file

    no idea you'd need an ms word vba code guru!

  9. #9
    Registered User
    Join Date
    07-25-2010
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Conversion of text files without change in the original file

    Thanks martin

  10. #10
    Registered User
    Join Date
    07-25-2010
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Conversion of text files without change in the original file

    I try to do with what ever you told in the text files, but the problem is the spacing should not be changed in the file.
    For ex:
    BUARDC 04294008295 010321 6000 7/17/2010 0000354652 000224

    In the above example there is a two space between the date and the next item, so the leading zero should be adjusted in the two spaces, so after adding the leading zero there should be one space between them.

    Kindly help me!!!

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conversion of text files without change in the original file

    not going to happen! if you insert something everything moves to the right that how text editors work.
    having said that this open source text editor is brilliant it allows column editing (read the help files) so you could Delete the excess spaces in one go
    http://notepad-plus-plus.org/release/5.7
    Last edited by martindwilson; 07-31-2010 at 05:35 AM.

  12. #12
    Registered User
    Join Date
    07-25-2010
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Conversion of text files without change in the original file

    The path given by you its not working, can you some alternative path for this.

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conversion of text files without change in the original file

    works fine for me try the home page
    http://notepad-plus-plus.org/home
    Last edited by martindwilson; 07-31-2010 at 10:31 AM.

  14. #14
    Registered User
    Join Date
    07-25-2010
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Conversion of text files without change in the original file

    its a software? i need to install it into my desktop?

  15. #15
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conversion of text files without change in the original file

    sorry mate but you seem to be a little lost! yes it is software its an open source advanced text editor.

  16. #16
    Registered User
    Join Date
    07-25-2010
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Conversion of text files without change in the original file

    But in our we cannot able to use new software's

  17. #17
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conversion of text files without change in the original file

    tough! then go through them manually!

+ 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