Jump to content
Macro Express Forums

How to write script from IE textfield to Excel

Recommended Posts

Hi everyone,


I would like to copy a textfield from a webpage(IE, FF, chrome, etc...) to Excel. Could someone show me how to do this?


I am evaluating Macro Express Pro for my company and I need to show that this is possible to do in Macro Express. Thus far I am unable to create a script from the evaluation copy to simulate copying the content from a textfield in web browser to excel.


Plus I would like to automate this script without having to use hotkeys.


I would appreciate everyone's input on this.


thanks a bunch.

Link to comment
Share on other sites

Before I make my usual suggestions do you realize you can link directly to web data with Excel? It's a very simple process and it's essentially like linking to any data source in Excel the way it periodically updates the data. The only difference is they have made it real simple to do now. Plenty of how-to videos out there as well.

Link to comment
Share on other sites

Thanks Cory for your immediate response.


I will take a look at the procedure to link web data with Excel and I will suggest it to my supervisor. Would you have any suggestions on a good how-to for this? If you or anyone could still show me how to write the script via Macro Express Pro, I will appreciate it.


I will suggest both solutions once it is presentable and I will let my boss decide which is best suited for the task he needs to do.


Thank you.

Link to comment
Share on other sites

Just do a Google search for “Excel Link web page” or something like that. I found this one that looks pretty good.


Macro Express indeed has the ability to open your browser, go to a page, copy text, and what have you. The one drawback is that it needs to interrupt the user to do all this. Or as some have done another PC dedicated to such activities with no active user. You can start with the “Web Site” command under the “Internet” category then the rest for the most part is using the same means of navigation you use as a user with mouse and keyboard input and gathering info with the clipboard. There several good methods one can use. The warning however is that issues like timing and the placement of objects in the web browser can be very difficult to deal with when they change later, are resized and what have you. Read some of the posts here and you can see many struggle with this. Even the experts. Because the environment is so dynamic MEP has a hard time dealing with it.


I have written probably a hundred macros like this and have taken what some see as a more advanced method. I disagree and actually think it’s simpler. That is I use the External Script command and silently grab the HTML content from the address (Imagine saving the file as raw HTML) and process it. EG the IRS publishes a table of SSN area and high group numbers on the internet I use for validating SSNs in one of my macros. So I have a macro that quietly downloads the file and extracts all the needed data for me and sticks it another file ready to use by other macros or spreadsheets to link to. The cool part is that there are never any timing issues, never any problems with navigation, and it’s all completely invisible to the user.


Unfortunately I need to get on the road soon to go demo a new macro and spreadsheet to a client right now so I can’t make a quick example. But if you like maybe you could give me an example an I might have time later. Or better yet give me a call this afternoon and I can give you some ideas. I generally charge for my time but initial consultation calls are always free. You can make a free Google Voice call (it calls you and hooks us up) from my contact page or send me a PM or fill out the contact form on my webpage.

Link to comment
Share on other sites

Actually a user form input field is quite differnt. Sorry I don't have time to write you someting at the moment. I have some revisions to do to my billing macro to get done today.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...