Excel error file not found with hyperlink using defined name

57 views
Skip to first unread message

Darrell Reich

unread,
Aug 7, 2023, 11:42:26 AM8/7/23
to openpyxl-users
The code to create a hyperlink works.
The code to create a defined name does not work when used in a hyperlink?
The linked example below shows quoted absolute workbook reference as 'Sheet'!$A$1'
I also tried file.xlsx#'Sheet'!$A$1 but Microsoft Excel Office 365 is not happy with that as a defined name but OK with that in a hyperlink.
To debug, I tried the other way and read a spreadsheet with a hyperlink to a named cell.
I compared the python debug prints of the defined names using openpyxl.
The working read in data matches the one I'm trying to create now with the sheet not file reference above.
Excel still says error file not found and offers to repair the file removing the defined name and breaking the link.
Unlike Word, Excel does not have a show field codes option?
When I mouse over the working and not working hyperlinks and go to the defined name manager window, they look the same to me?

Reply all
Reply to author
Forward
0 new messages