-
Notifications
You must be signed in to change notification settings - Fork 3.6k
HYPERLINK function not working correctly when you try to link a cell to another spreadsheet #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Nasty, nasty Microsoft.... they changed the syntax for inter-sheet references between formats. For xls, the syntax is Will need to take a closer look at handling this, and it's made more awkward by using it in a formula |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Sometime between 7-odd years ago when this issue was marked stale and now, it was resolved. It happened so long ago that I can't even point to specific fix. Oddly, however, the issue was reported against Xlsx, and the commentary suggests that Xls was behaving. However, it seems to me that Xls is not working correctly, so I am reopening the issue, to be closed when I submit a PR to fix it, which I will do shortly. |
Fix #56, which had gone stale but is now reopened. The problem which it reported with Xlsx Writer was fixed long ago. However, Xls Writer has 2 problems regarding hyperlinks. First, some logic which should have been `if ... elseif ... else ...` was coded as `if ... if ... unconditional ...`, resulting in multiple writes and a corrupt worksheet (which Excel does fix correctly). Second, it treated a hyperlink url starting with `#` (pointer to a cell in the same spreadsheet) as external, when it should be treated as internal. Also changed `Hyperlink::isInternal` to recognize a starting `#`, and to use `str_starts_with('sheet://')` rather than `str_contains`.
When you set the content of a cell to =HYPERLINK("#anotherspreadshet!A1","link") the class throws the next Fatal error:
The text was updated successfully, but these errors were encountered: