I want to use a powershell script to get data from an excel sheet to query an online database
I used this code to open the spreadsheet from powershell
$xl = New-Object -COM "Excel.Application"
$xl.Visible = $true
$wb = $xl.Workbooks.Open("C:\Documents\Book4.xlsx")
$ws = $wb.Sheets.Item(1)
But I can't really work on the spreadsheet ie reference cells. What I need is to select contents of individual cells, store in a variable and use to populate a query for an online database.
I used this code to access the website url
$IE=new-object -com internetexplorer.application
$IE.navigate2("http://www.google.com")
$IE.visible=$true
But I've not been able to fill the form or query the database.
Please how can I do this using powershell? Thanks