question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

write_url produces broken hyperlink

See original GitHub issue

Hi,

I am using XlsxWriter to create an report file with links to problems in other excel documents. Everything worked great, until i realized that some hyperlinks didn’t work when there was a space in the name of a worksheet.

I am using Python version 3.4 and XlsxWriter 0.8.5 (freshly pulled from github) and Excel version 2013.

Here is some code that demonstrates the problem:

import xlsxwriter

filename = 'test.xlsx'

wb = xlsxwriter.Workbook(filename)

ws = wb.add_worksheet('other_sheet')
wb.add_worksheet('test sheet')

# normally one would use an internal link here, but for this demonstration i need an external link:
ws.write_url(0, 0, "external:{}#'test sheet'!A1".format(filename))  
wb.close()

I’ve already found the problem: External links are escaped test.xlsx#test sheet!A1 becomes test.xlsx#test%20sheet!A1 which doesn’t work. Excel 2013 would like to have test.xlsx#'test sheet'!A1.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jmcnamaracommented, Apr 27, 2016
0reactions
816-8055commented, Apr 28, 2016

Thank you very much! That’s what I’d call a quick fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a Broken Link, Use the Broken Link Report Tool ...
Using the Broken Link Report: · Select "Reports" from the top navigation (1st row of navigation in black) · Select "Broken Links". On...
Read more >
What are Broken Links? And How Do You Find and Fix Them?
A broken link is a web-page that can't be found or accessed by a user, for various reasons. Web servers will often return...
Read more >
Internet Tips: Tips for Fixing Broken Links - GCF Global
Learn how to fix a broken link in this free lesson, which offers several tips for fixing broken links.
Read more >
How to Fix Broken Links On Your Website - Monsido
Problem solved! This is the best solution for fixing broken links in terms of SEO, especially if the missing page has backlinks pointing...
Read more >
What are Broken Links? How Do You Find and Fix Them?
What Causes Broken Links? How to Find Broken Links on Your Website; How to Fix Broken Links; Wrap Up. Download this post by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found