Microsoft Excel post data to Google Spreadsheet with Selenium
tutor:
Requirements:
Install selenium basic (see references)
step by step:
- Create form and assign to spreadsheet name
- Find variable name on each input text in form
- Create html page in your localhost
- Create data in excel workbook
- Create button and assign macro each button
- Assign reference to Selenium Library and Insert macro coding
Sub Button1_Click()
Dim MyParm As New Webdriver
MyParm.Start "chrome", "http://localhost/getData/salesorder.html" MyParm.get "http://localhost/getData/salesorder.html" MyParm.Wait 500
MyParm.FindElementByName("entry.xxx").SendKeys (Range("a2").Value) MyParm.FindElementByName("entry.xxx").SendKeys (Range("b2").Value) MyParm.FindElementByName("entry.xxx").SendKeys (Range("c2").Value) MyParm.FindElementByName("entry.xxx").SendKeys (Range("d2").Value) MyParm.FindElementByName("entry.xxx").SendKeys (Range("e2").Value) MyParm.FindElementByXPath("//button[@type='submit']").Click
End Sub
- Test
References: