I want to retrieve a hyperlink to a cell in Excel and then paste this hyperlink in a third party app. Clicking the hyperlink should load Excel with the appropriate workbook and that cell should be selected with the cursor.
The hyperlink should work in Microsoft-related products like OneNote; for example, if I have a workbook “D:\abc.xls” and I want to jump to cell C12, I would make an hyperlink like “D:\abc.xls#C12”.
And this would work; however, if I paste this in a non-Microsoft applicaltion it just opens up Excel and the workbook, but the cell isn’t highlighted. How can I get this to work?
RE comment
That’s what i was suggesting, for example save the following as a .reg and import it
This makes an
XLOPEN://URL protocol handler thatr when invoked will run XLOPEN.VBS.Save the following as
C:\TEMP\XLOPEN.VBSNow if you run
xlopen://c:\null\test.xlsx#Q50or use
<a href="xlopen://c:\null\test.xlsx#Q50">bla bla</a>Windows will lookup
xlopen://and pass the stringxlopen://c:\null\test.xlsx/#Q50to XLOPEN.VBS which extracts the file pathc:\null\test.xlsx1and opens it, then selects the range after the #.This works if called in browsers/from the shell/via the windows API, no idea if it will work in the 3rd party app. (You would replace the script with a helper exe)