Reputation: 1
I am writing a python code which writes a hyperlink into a excel file.This hyperlink should open in a specific page in a pdf document.
I am trying something like Worksheet.write_url('A1',"C:/Users/...../mypdf#page=3") but this doesn't work.Please let me know how this can be done.
Upvotes: 0
Views: 1599
Reputation: 1393
Are you able to open the pdf file directly to a specific page even without xlsxwriter? I can not.
From Adobe's official site:
To target an HTML link to a specific page in a PDF file, add #page=[page number] to the end of the link's URL.
For example, this HTML tag opens page 4 of a PDF file named myfile.pdf:
Note: If you use UNC server locations (\servername\folder) in a link, set the link to open to a set destination using the procedure in the following section.
If you use URLs containing local hard drive addresses (c:\folder), you cannot link to page numbers or set destinations.
Upvotes: 1