I have a ms excel 2007 worksheet with a column (A) of hyperlinks using the excel function in this way =HYPERLINK(A2,"url"
.
How Can I make (if this is possible) open all cels on that column in the NON default browser?
I have a ms excel 2007 worksheet with a column (A) of hyperlinks using the excel function in this way =HYPERLINK(A2,"url"
.
How Can I make (if this is possible) open all cels on that column in the NON default browser?
If you enter the path of the browser with the exe file and put the URL after, it will open using that browser.
For example
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://superuser.com/questions/1079979/how-can-i-make-an-excel-column-of-hyperlinks-open-in-non-default-browser
Unfortunately you can not use this in Excels Hyperlink
function, so we need a workaround.
One solution would be, to create a batch file and set the hyperlink to run that batch file. All you need to do is copy the code into a text file, and save it as .bat
Another solution is using VBA.
Press alt + F11, and paste the following code into "ThisWorkbook".
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
If Target.Name = "asd" Then 'Or you can identify a cell using it's range instead of its name If Target.Range.Address = "$A$1" Then
Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe http://superuser.com/questions/1079979/how-can-i-make-an-excel-column-of-hyperlinks-open-in-non-default-browser")
End If
End Sub
Than you have to make a hyperlink out of the cell by right click, hyperlink, select place in this document, than ok.
This question is a little old but it is referenced in a newer, similar question so I am adding an updated answer. In my example my spreadsheet has three columns, DATE, URL, OTHER_INFO
and the URL column has the links.
With the excellent ImportExcel module this becomes pretty easy. From the module, use the Import-Excel cmdlet to read the spreadsheet into a variable and then use a foreach loop to open each link:
$excel = Import-Excel -Path "C:\Users\UserName\Desktop\Temp\test.xlsx"
$brows = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
foreach ($url in $excel.URL){
Start-Process -FilePath $brows -ArgumentList $url
# Write-Host $brows $url ## TEST
}
Start-Process -FilePath $brows -ArgumentList $url
This opens each link in a new tab in Edge.
If you are unable to use the ImportExcel module, it is more verbose but you can still access spreadsheet data using the COM objects