Automate Data Entry with Chrome Using Excel Macros

preview_player
Показать описание

Here's the complete VBA macro code:
Option Explicit
Dim driver As New WebDriver
Sub Test()
driver.Start "chrome"

driver.Window.Maximize

driver.Wait 1000
driver.FindElementById("State").Click
driver.FindElementById("State").SendKeys Sheet1.Cells(2, 1).Value

driver.Wait 1000
driver.FindElementById("District").Click
driver.FindElementById("District").SendKeys Sheet1.Cells(2, 2).Value

driver.Wait 1000
driver.SendKeys (keys.Enter)

driver.FindElementByName("RespondentAge").SendKeys Sheet1.Cells(2, 3).Value
driver.Wait 1000

driver.FindElementByName("RespondentName").SendKeys Sheet1.Cells(2, 4).Value
driver.Wait 1000

driver.FindElementByName("RespondentMobileNo").SendKeys Sheet1.Cells(2, 5).Value
driver.Wait 1000

driver.FindElementByName("RespondentGender").Click
driver.Wait 1000
driver.FindElementByName("RespondentGender").SendKeys Sheet1.Cells(2, 6).Value
driver.Wait 1000

driver.FindElementByClass("btn-primary").Click
'driver.SendKeys (keys.Enter)

driver.FindElementByName("FQ1").Click
driver.FindElementByName("FQ1").SendKeys Sheet1.Cells(2, 7).Value
driver.Wait 1000

driver.FindElementByName("FQ2").Click
driver.FindElementByName("FQ2").SendKeys Sheet1.Cells(2, 8).Value
driver.Wait 1000

driver.FindElementByName("FQ3").Click
driver.FindElementByName("FQ3").SendKeys Sheet1.Cells(2, 9).Value
driver.Wait 1000

driver.FindElementByName("FQ4").Click
driver.FindElementByName("FQ4").SendKeys Sheet1.Cells(2, 10).Value
driver.Wait 1000

driver.FindElementByName("FQ5").Click
driver.FindElementByName("FQ5").SendKeys Sheet1.Cells(2, 11).Value
driver.Wait 1000

driver.SendKeys (keys.Enter)

End Sub
Рекомендации по теме
Комментарии
Автор

this video is a blessing for years to come, thank you for sharing.

danielsquillante
Автор

nice content Dinesh Kumar Takyar. I crushed the thumbs up on your video. Always keep up the excellent work.

KeyserTheRedBeard
Автор

But sir if your data has multiple rows then...? How will you autofill that data?

kalpeshmewada
Автор

hello ive a query that how to repeat this task.. lets say I have 1000 entry and want to out it on web so how can do that?

dhananjaytakle
Автор

Hello sir, how can I add 50 records one after the other on a particular website.

sohamtradingsystem
Автор

It is filling the form sequentially. do you know they way to fill all the column at one go

keepitsimple
Автор

Sir apka video dekha bohot help full h. Mujhe kuch clear krna h apse agar kisi website ko auto fill krte h to us par auto fill nhe kr pate to uske liye koi hisab h jisse ji ham auto fill kr le or software usko detach na kar pae. Plz agar esa hota h to mujhe btao sir plz help.

Dildarofficialvlog
Автор

Thank You. It's really helpful for my work

ArunKumar-kgxx
Автор

Thanks for your video, but sir if i have a button to "browse" for a file and a button to "upload" the file, how to handle this? Thanks again.

ednedn
Автор

Thanks alottt but how can i repeat this task yo do multiple rows
Can u help me please

temokater
Автор

Hello Mr. Daniesh Kumar Takyar, I knew that to fill elements with sendkeys, but how to fill web elements with paste or keys Control + V, ( on chrome, vba, selenium )

xrman
Автор

You are always awesome sir👏🏻👏🏻👏🏻👏🏻 thank you for the video

sureshsanjeev
Автор

Sir, my data has multiple rows, then I how will autofill that data

DK-rwxy
Автор

यह समस्या मैंने भेजा था। समाधान करने के लिए धन्यबाद सर।

SKTRAININGCENTERSIDHI
Автор

Wonderful video
Sir could you please make a video on how to automate data input in a past disabled date picker using selenium and excel VBA? It would be a great help.
Thanks in advance.

russellice
Автор

Love it, I have a project I can use with this right away.

excelrobot
Автор

Hello Sir, I did the coding as you mentioned in your Video but i m stuck on a page where i neet to enter an OTP for the proceedings though have another problem that i have select a particular Phone no. And then wait for the OTP. BUT the problm is when i dirct to that page and select the radio button for selection of Phone no. It shows me the "Out of Memory" error.

I gusse its hard to get time for these kind of requsts but its will be really appreciated Sir if we can connect over Email or Whatsapp for my query.

Though thanks a lot for helping us out with this Great code. 👍 😇

VamTheWarlLock
Автор

please advise its showing type mismatch

RameshK-lxlo
Автор

Hello. Very nice, thank you for sharing tips. What about web page based on javascript ? could you please post a video to find fields and to take control ?

dd
Автор

Sirji button code not working pls help

chetanthakkar
welcome to shbcf.ru