+ Reply to Thread
Results 1 to 19 of 19

Code to download information from notepad and copying info to the excel

  1. #1
    Registered User
    Join Date
    06-28-2007
    Posts
    21

    Smile Code to download information from notepad and copying info to the excel

    Hi all

    Everyday system generates a notepad with the information.. from the notepad i ve to copy paste the info to the excel manually.

    Can a code be written where (after downloading information to the excel from the notepad) it automatically fill the information in the excel.

    For your reference i ve attached both notepad and excel with dummy datas.
    (how i do manually)
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    Any updates ??

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon deepikabalaji

    It's not usually too tricky to extract data from a notepad (.txt) file. The problem in this case is that the data is formatted by having spaces inserted - there is no real handle or control character which you could build into some code to tell Excel when to move from one cell to the next.

    All the sheet tab names at the top of each section would also be problematic.

    Can your system provide some other form of output (eg .csv file etc).

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  4. #4
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    Hi

    I am not sure, wat u mean by that..

    Still i tried doing tat..
    Just check the attached file if that helps..

    Wat i know is..

    I can download informations from notepad to excel in a seperate worksheet and delimit it... From tat i ve to copy paste information to the excel i ve as per the order manually...

    I think macro code can do that
    Attached Files Attached Files

  5. #5
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi deepikabalaji

    OK. By using the Text Import wizard, something like this will bring the text into Excel :

    Please Login or Register  to view this content.
    However, you want it splitting into several sheets. Will each group always consist of the same number of lines? Otherwise we'll have to use the header in column E to determine where to break from to transfer information to other tabs.

    HTH

    DominicB

  6. #6
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    No.. Sometimes it may increase and sometime it may decrease...

  7. #7
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    Any updates pls?

  8. #8
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    See if the attached one helps...........

    I ve copied the information from the notepad and pasted in the attached excel - sheet 1. I ve also bolded the columns i am looking for daily.
    1) Daily indexing (Row 49)
    2) Daily Reveiwing (Row 80)
    3) Daily Re index errors (Row 633)

    Also there are 3 other sheets index-prod for indexing
    Review prod for reviewing
    Errors for Re index errors
    where i need to fill the notepad information.

    Kindly provide me the code for this.....

    Let me know if this one is not clear
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    No updates? I hope the attached one is very mush clear.

  10. #10
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi deepikabalaji

    OK. Try using this code. It should open your .txt file, sort it into three tabs according to the title of each chunk of data :

    Please Login or Register  to view this content.
    Obviously, you're going to have to change the path (marked in blue) to reflect where the .txt file will be on your system.

    HTH

    DominicB

  11. #11
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    Hi

    I am getting error on the below one

    a = Selection.Find(What:="Reviewing", After:=ActiveCell, SearchOrder:=xlByRows, SearchDirection:=xlNext).Row

  12. #12
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    Hi
    Thanks for your code.. actually the code is not providing the output i am looking for..

    So, I ve again attached the excel sheet with the required output..

    sheet 1 contains the information (i copy, pasted from notepad to the excel)
    Its not in an aligned order
    Now from sheet 1 i ve to copy paste the indexing, reveiwing and errors datas to the the respective worksheets. These datas i ve bolded in the sheet 1.

    In the index-prod sheet i ve filled information for one user.. similarly for reveiw prod and errors.

    Can anyone tell me how to make this automatically?
    Attached Files Attached Files

  13. #13
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Closed for cross posting.

    Please read forum rules below. If you agree to these rules PM and I will unlock this thread. Once unlocked please add the link to the other post or posts

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  14. #14
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    Any thoughts??????????

  15. #15
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    No thoughts?????

    (My hands are getting damaged by doing this manually)

  16. #16
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    Is that the thread not clear?

  17. #17
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    Is this task is very tough??

  18. #18
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    Can anyone help me out with this issue?

  19. #19
    Registered User
    Join Date
    06-28-2007
    Posts
    21
    I am really in a need of your helps?

    Anyone please comment on this

+ 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