Consulting

Results 1 to 7 of 7

Thread: Copy and paste multiple data from Excel to Internet Explorer

  1. #1
    VBAX Newbie
    Joined
    Feb 2017
    Posts
    2
    Location

    Copy and paste multiple data from Excel to Internet Explorer

    Hi!
    I am just new in VBA and I just learn it online via youtube or via google. I would like to ask help to automate a task where I copy information in Excel and paste it in Internet Explorer. I usually have 3K items in excel that I need to put in internet explorer and it is taking a lot of time to do this manually.

    I have googled and only manages to get how to open IE and the data VBA code used is pointing to one cell only while I need to make a loop since I need to enter many data after the other.

    Example:
    Name Gender Age
    Shayne Female 33
    Anna Female 20

    I need to put that in the IE and after I input the Age, I need to click "Submit" so I could enter the next line (Anna's data) and so on and so forth.

    Hope someone could help.

  2. #2
    VBAX Mentor
    Joined
    Aug 2012
    Posts
    367
    Location

    there is hope

    don't be ashamed of being new - or of asking annoying questions.

    try this link http://www.makeuseof.com/tag/using-v...l-spreadsheet/
    and please let us know how you get on. this is a new one for me, and I am curious to learn how you go.

    thanks
    Werafa
    Remember: it is the second mouse that gets the cheese.....

  3. #3
    VBAX Newbie
    Joined
    Feb 2017
    Posts
    2
    Location
    Hi Werafa,

    Thanks for the reply and apologies as I may have confused you. The link provided is on automating openning multiple IE sessions. While my problem is on submitting data in IE.

    Like in the example above, I will go to the Internet and put the Name and Age one after the other and submit each time I am done in putting the name and age of one person.

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,874
    I doubt many people will know the answer to this, especially as techniques required are probably heavily dependent upon the website concerned. So this will need some development/experiment.
    Can you give us that website url?
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    VBAX Mentor
    Joined
    Aug 2012
    Posts
    367
    Location
    There is little confusion, but much lack of knowledge. That must make me an expert

    thoughts that may help:
    - to manipulate object properties, such as form fields, an object with the appropriate properties must exist.
    - Find the name of the correct object, and you are half way there.
    - https://msdn.microsoft.com/en-us/library/ms970456.aspx is quite old, but may give you a head start with some naming conventions

    as an alternative, there are programs out there that are used to write 'screen scrapers'. these pretend to be a human operator, and can 'click' on buttons, as well as enter data into fields. my last employer used these to enter numbers from a huge list into a data entry form, and record the resulting data page.

    werafa
    Remember: it is the second mouse that gets the cheese.....

  6. #6

  7. #7
    VBAX Mentor
    Joined
    Aug 2012
    Posts
    367
    Location
    more like http://webscraper.io
    or https://chrome.google.com/webstore/d...kfioidjg?hl=en

    Whilst these are primarily about data capture, at least some allow database driven data entry.

    but....

    going back to your original question, you can open IE, and get data from one cell.
    can you place it in the IE form?

    you will need something like (i'm paraphrasing the code)

    " Do while myRow has data
    var1 = mySheet.range(name)
    var2 = mySheet.range(gender)
    var3 = mySheet.range(age)

    ie.page.object(field1) = var1
    ie.page.object(field2) = var2
    ie.page.object(field3) = var3

    ie.page.object(the submit button) = true

    next myRow"

    This should give you the looping structure, and read the data from excel (you will still need to translate this into actual VBA code)
    unfortunately, I don't know the names of the relevant IE page objects, so you will still need to research this
    Remember: it is the second mouse that gets the cheese.....

Posting Permissions

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