Adding links to another cell using the xlwt module for Python

1,179 views
Skip to first unread message

psyduck

unread,
Jul 26, 2011, 10:49:21 AM7/26/11
to python-excel
This is a question I posted on StackOverflow, but I think this may be
a more appropriate place to inquire about this.

I know that I can have a certain cell contain a hyperlink that points
to an external site like this (I actually found an example on this
group :)

from xlwt import Workbook, Formula
wb = Workbook()
sheet = wb.add_sheet('testing links')
link = 'HYPERLINK("http://stackoverflow.com/"; "SO")'
sheet.write(0, 0, FORMULA(link))


However, what I actually want to do is something like "drilling
through" the document. I want cell A1 from "sheet1" to point to cell
F5 in "sheet3" for example.

Does someone know if what I am asking is possible; and if so, what
syntax I must use to accomplish that?

John Machin

unread,
Jul 26, 2011, 5:07:40 PM7/26/11
to python...@googlegroups.com

Step 1: STW to find out how a user does it in Excel:

=HYPERLINK("#Sheet3!F5","some text")

Step 2: .....
 
Reply all
Reply to author
Forward
0 new messages