This works for me:

wbook.active['A8'].hyperlink = "http://www.espn.com"
wbook.active['A8'].value = 'ESPN'
wbook.active['A8'].style = "Hyperlink"
Answer from JohnFromWV on Stack Overflow
🌐
openpyxl
openpyxl.readthedocs.io › en › stable › api › openpyxl.worksheet.hyperlink.html
openpyxl.worksheet.hyperlink module — openpyxl 3.1.3 documentation
openpyxl.worksheet.hyperlink module · class openpyxl.worksheet.hyperlink.Hyperlink(ref=None, location=None, tooltip=None, display=None, id=None, target=None)[source] · Bases: Serialisable · display · Values must be of type <class ‘str’> id ·
🌐
Reddit
reddit.com › r/learnpython › how to extract url from a cell containing a hyperlink using openpyxl?
r/learnpython on Reddit: How to extract URL from a cell containing a hyperlink using openpyxl?
October 16, 2020 -

when I use ws.cell(...).value, i got something like this: =IF(COUNTBLANK(B107:D107)>0,"",HYPERLINK(CONCATENATE(Setup!$B$5,SUBSTITUTE(SUBSTITUTE(CONCATENATE(B107,"+",C107,"+",D107,"+",E107)," ","+"),"/","%2F")),"Google Map"))

how do i go about extracting the URL?

🌐
YouTube
youtube.com › data automation
OpenPyXL - Adding Hyperlinks to a Cell in an Excel Workbook with Python | Data Automation - YouTube
This video demonstrates how to apply hyperlinks to a cell, which direct a user to another tab within the workbook, using Python's library OpenPyXL. I use Ana...
Published: November 14, 2023
Views: 1K
🌐
openpyxl
openpyxl.readthedocs.io › en › stable › _modules › openpyxl › worksheet › hyperlink.html
openpyxl.worksheet.hyperlink — openpyxl 3.1.3 documentation
from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( String, Sequence, ) from openpyxl.descriptors.excel import Relation · [docs] class Hyperlink(Serialisable): tagname = "hyperlink" ref = String() location = String(allow_none=True) tooltip = String(allow_none=True) display = String(allow_none=True) id = Relation() target = String(allow_none=True) __attrs__ = ("ref", "location", "tooltip", "display", "id") def __init__(self, ref=None, location=None, tooltip=None, display=None, id=None, target=None, ): self.ref = ref self.location = location self.tooltip = tooltip self.display = display self.id = id self.target = target
🌐
openpyxl
openpyxl.readthedocs.io › en › 3.1 › api › openpyxl.worksheet.hyperlink.html
openpyxl.worksheet.hyperlink module — openpyxl 3.1.4 documentation
openpyxl.worksheet.hyperlink module · class openpyxl.worksheet.hyperlink.Hyperlink(ref=None, location=None, tooltip=None, display=None, id=None, target=None)[source] · Bases: Serialisable · display · Values must be of type <class ‘str’> id ·
🌐
OpenPyXL
openpyxl.readthedocs.io › en › 2.6 › _modules › openpyxl › worksheet › hyperlink.html
openpyxl.worksheet.hyperlink — openpyxl 2.6.4 documentation
from __future__ import absolute_import # Copyright (c) 2010-2019 openpyxl from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( String, Sequence, ) from openpyxl.descriptors.excel import Relation · [docs]class Hyperlink(Serialisable): tagname = "hyperlink" ref = String() location = String(allow_none=True) tooltip = String(allow_none=True) display = String(allow_none=True) id = Relation() target = String(allow_none=True) __attrs__ = ("ref", "location", "tooltip", "display", "id") def __init__(self, ref=None, location=None, tooltip=None, display=None, id=None, target=None, ): self.ref = ref self.location = location self.tooltip = tooltip self.display = display self.id = id self.target = target ·
🌐
GitHub
github.com › ericgazoni › openpyxl › blob › master › openpyxl › sample › hyperlink.py
openpyxl/openpyxl/sample/hyperlink.py at master · ericgazoni/openpyxl
img = openpyxl.drawing.Image('logo.png') ws.add_image(img) ws.cell(row=0,column=0).value = "TEXT" ws.cell(row=0,column=0).hyperlink = "http://google.com" wb.save(os.path.join(here, "files", 'logo.xlsx'))
Author: ericgazoni
🌐
openpyxl
openpyxl.readthedocs.io › en › 3.1 › _modules › openpyxl › worksheet › hyperlink.html
openpyxl.worksheet.hyperlink — openpyxl 3.1.4 documentation
from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( String, Sequence, ) from openpyxl.descriptors.excel import Relation · [docs] class Hyperlink(Serialisable): tagname = "hyperlink" ref = String() location = String(allow_none=True) tooltip = String(allow_none=True) display = String(allow_none=True) id = Relation() target = String(allow_none=True) __attrs__ = ("ref", "location", "tooltip", "display", "id") def __init__(self, ref=None, location=None, tooltip=None, display=None, id=None, target=None, ): self.ref = ref self.location = location self.tooltip = tooltip self.display = display self.id = id self.target = target
Find elsewhere
🌐
OpenPyXL
openpyxl.readthedocs.io › en › 3.1.2 › api › openpyxl.worksheet.hyperlink.html
openpyxl.worksheet.hyperlink module — openpyxl 3.1.2 documentation
openpyxl.worksheet.hyperlink module · View page source · class openpyxl.worksheet.hyperlink.Hyperlink(ref=None, location=None, tooltip=None, display=None, id=None, target=None)[source]¶ · Bases: openpyxl.descriptors.serialisable.Serialisable · display¶ · Values must be of type <class ‘str’> id¶ ·
🌐
Google Groups
groups.google.com › g › openpyxl-users › c › 92JFYZEnyE8
Hyperlinks to another tab within the same workbook
Assuming Target Sheet Name = 'Index', Target Cell = D3: currentCell.value = 'Index Tab' currentCell.hyperlink = '#%s!%s' % ('Index','D3') Or '#Index!D3' Hope this helps! -Matt ... Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message ... Matt, Thank you. Your example was exactly what I needed. I am fairly new to Python and very new to openpyxl.
🌐
OpenPyXL
openpyxl.readthedocs.io › en › 2.5 › _modules › openpyxl › worksheet › hyperlink.html
openpyxl.worksheet.hyperlink — openpyxl 2.5.15 documentation
from __future__ import absolute_import # Copyright (c) 2010-2019 openpyxl from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( String, Sequence, ) from openpyxl.descriptors.excel import Relation · [docs]class Hyperlink(Serialisable): tagname = "hyperlink" ref = String() location = String(allow_none=True) tooltip = String(allow_none=True) display = String(allow_none=True) id = Relation() target = String(allow_none=True) __attrs__ = ("ref", "location", "tooltip", "display", "id") def __init__(self, ref=None, location=None, tooltip=None, display=None, id=None, target=None, ): self.ref = ref self.location = location self.tooltip = tooltip self.display = display self.id = id self.target = target ·
🌐
OpenPyXL
openpyxl.readthedocs.io › en › 2.4 › _modules › openpyxl › worksheet › hyperlink.html
openpyxl.worksheet.hyperlink — openpyxl 2.4.11 documentation
from __future__ import absolute_import from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( String, Sequence, ) from openpyxl.descriptors.excel import Relation · [docs]class Hyperlink(Serialisable): tagname = "hyperlink" ref = String() location = String(allow_none=True) tooltip = String(allow_none=True) display = String(allow_none=True) id = Relation() target = String(allow_none=True) __attrs__ = ("ref", "location", "tooltip", "display", "id") def __init__(self, ref=None, location=None, tooltip=None, display=None, id=None, target=None, ): self.ref = ref self.location = location self.tooltip = tooltip self.display = display self.id = id self.target = target ·
🌐
telecomHall
telecomhall.net › ai
Python(Openpyxl) Tip-2:: Create Hyperlink in Title Page - AI - telecomHall Forum
February 14, 2023 - It then adds a header to the new ... the Font, border, and Alignment styles from the openpyxl.styles module. The width of column J is also set to 40. Next, the code loops through all sheets in the workbook and adds a hyperlink to each sheet in the “Title Page” worksh...
🌐
OpenPyXL
openpyxl.readthedocs.io › en › 3.0 › _modules › openpyxl › worksheet › hyperlink.html
openpyxl.worksheet.hyperlink — openpyxl 3.0.10 documentation
from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( String, Sequence, ) from openpyxl.descriptors.excel import Relation · [docs]class Hyperlink(Serialisable): tagname = "hyperlink" ref = String() location = String(allow_none=True) tooltip = String(allow_none=True) display = String(allow_none=True) id = Relation() target = String(allow_none=True) __attrs__ = ("ref", "location", "tooltip", "display", "id") def __init__(self, ref=None, location=None, tooltip=None, display=None, id=None, target=None, ): self.ref = ref self.location = location self.tooltip = tooltip self.display = display self.id = id self.target = target
🌐
PyTutorial
pytutorial.com › python-openpyxl-hyperlinks-external-references-guide
PyTutorial | Python openpyxl Hyperlinks External References Guide
November 16, 2025 - Excel hyperlinks connect cells to external resources. They link to websites, files, or email addresses. Python openpyxl module helps automate hyperlink creation.
🌐
OpenPyXL
openpyxl.readthedocs.io › en › 3.0 › api › openpyxl.worksheet.hyperlink.html
openpyxl.worksheet.hyperlink module — openpyxl 3.0.10 documentation
openpyxl.worksheet.hyperlink module · View page source · class openpyxl.worksheet.hyperlink.Hyperlink(ref=None, location=None, tooltip=None, display=None, id=None, target=None)[source]¶ · Bases: openpyxl.descriptors.serialisable.Serialisable · display¶ · Values must be of type <class ‘str’> id¶ ·
🌐
OpenPyXL
openpyxl.readthedocs.io › en › 2.4 › api › openpyxl.worksheet.hyperlink.html
openpyxl.worksheet.hyperlink module — openpyxl 2.4.11 documentation
openpyxl.worksheet.hyperlink module · Edit on Bitbucket · class openpyxl.worksheet.hyperlink.Hyperlink(ref=None, location=None, tooltip=None, display=None, id=None, target=None)[source]¶ · Bases: openpyxl.descriptors.serialisable.Serialisable · display¶ · Values must be of type <class ‘str’> id¶ ·
🌐
OpenPyXL
openpyxl.readthedocs.io › en › 3.1.0 › api › openpyxl.worksheet.hyperlink.html
openpyxl.worksheet.hyperlink module — openpyxl 3.1.0 documentation
tagname = 'hyperlink'¶ · target¶ · Values must be of type <class ‘str’> tooltip¶ · Values must be of type <class ‘str’> class openpyxl.worksheet.hyperlink.HyperlinkList(hyperlink=())[source]¶ · Bases: openpyxl.descriptors.serialisable.Serialisable ·