use excel spreadsheet to fill web form [closed]

4

I have a spreadsheet in Excel, it was generated from a form on a system and then some data was selected. After that I have to put this data in another web form, this form is in another system than the one that generated the initial worksheet. To do this I use Ctrl C + Ctrl V :( and I waste a lot of time, besides having to check the data again later.

I would like to know if anyone knows of a specific program that does this automatically, transfer the data from a spreadsheet in excel to a web form?

If you do not know, can you tell me if it is possible to do this using VBA?

    
asked by anonymous 23.11.2015 / 02:06

1 answer

4

The simplest and cheapest way is to just export to a CSV format or any other format that is easy to import by the web application.

You just have the job of having to create the data importer on the web platform. But you still have manual labor.

Alternatively, you can also create more sophisticated automation.

Through VBA, send the data by the GET or POST method.

Example taken from OS-en

Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
URL = "http://www.somedomain.com"
objHTTP.Open "POST", URL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
objHTTP.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHTTP.send ("var1=value1&var2=value2&var3=value3")

See: link

In this way, just create an API to receive the data in the web application (in the website). Then the entire process will continue to be done within Excel, without having to copy and paste to a web form or without having to export and import to the web manually.

Another alternative is to connect directly to the database remotely. For this you need to free a user in the database for remote access.

One advantage is that you do not need to create any APIs on the website because the connection to the database is made directly.

This may be the simplest and most practical way to automate.

An example in SO-en: link

A topic right here in SO-pt: Failed to connect to MySQL via VBA

Obviously we are not going to talk about security, concepts and other related topics, as it would make the answer complicated, complicated and tiring.

    
23.11.2015 / 04:46