d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Automate Pasting Tab Delimited Values > Excel To Web
Add Reply New Topic New Poll
Member
Posts: 11,881
Joined: Aug 17 2007
Gold: 0.00
Aug 1 2015 03:18pm
Recently I've needed to perform data entry which involves entering data from an Excel table onto a webpage.

I would love to reach directly to the database, but apparently it's not an option.

If I copy an excel row, is there a way to automate the process of pasting each row into a corresponding form on the web (paste 1, tab to next form, paste 2...)
The cells in Excel would each have a corresponding match on the web, so there wouldn't be any issues with having more data than there we forms or anything like that.

Any help would be appreciated!
Thanks!

This post was edited by MidnightRider on Aug 1 2015 03:18pm
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Aug 1 2015 05:16pm
what kind of scripting experience do you have? for starters, convert the excel sheet to either CSV or import into a temp database so it's easier to use programmatically. sqlite is a good choice so you dont need to install postgres or something on a company computer.

with that said, there are a few options on how to enter the data.

1) pick your favourite scripting language to send a POST request directly. this might be easy or difficult to do, depending on the site. something like charles proxy can help you figure out what all the values are if it's not obvious from the code.
2) if it's difficult to send everything it wants (credentials, session, etc), you can use a virtual browser (i like python's mechanize). you simply open the site, optionally login / navigate to create your session. then you find the form fields, fill it in, and have the browser click the button to submit it.
3) you can write a greasemonkey script to fill in the fields on your actual browser.

there are probably more options, but those are the three i'd try. maybe something with selenium, but i have no experience with it. depending on your scripting experience, might be easier to just manually fill it in.

This post was edited by carteblanche on Aug 1 2015 05:27pm
Member
Posts: 11,881
Joined: Aug 17 2007
Gold: 0.00
Aug 1 2015 09:37pm
Quote (carteblanche @ Aug 1 2015 07:16pm)
what kind of scripting experience do you have? for starters, convert the excel sheet to either CSV or import into a temp database so it's easier to use programmatically. sqlite is a good choice so you dont need to install postgres or something on a company computer.

with that said, there are a few options on how to enter the data.

1) pick your favourite scripting language to send a POST request directly. this might be easy or difficult to do, depending on the site. something like charles proxy can help you figure out what all the values are if it's not obvious from the code.
2) if it's difficult to send everything it wants (credentials, session, etc), you can use a virtual browser (i like python's mechanize). you simply open the site, optionally login / navigate to create your session. then you find the form fields, fill it in, and have the browser click the button to submit it.
3) you can write a greasemonkey script to fill in the fields on your actual browser.

there are probably more options, but those are the three i'd try. maybe something with selenium, but i have no experience with it. depending on your scripting experience, might be easier to just manually fill it in.


Thanks for the information.
Unfortunately, I don't know much about scripting.

The website I'm working with has the most convoluted navigation process I have ever seen (I honestly don't think this is an exaggeration); therefore, I know I am not capable of automating the entire process.

After I've located where I'd like to transpose a given excel row, it would just be nice to know I could copy/paste without worrying about human error :cry:

This post was edited by MidnightRider on Aug 1 2015 09:37pm
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Aug 1 2015 10:06pm
i have a keyboard with a lot of macros, and several of my macros are copy/paste. that way i can keep 3 things in my clipboard. you can try looking for an app that does something similar. so instead of going back and forth between excel and the website for each field, you can copy all the fields for a single entry all at once.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll