write_url produces broken hyperlink
See original GitHub issueHi,
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:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in version 0.8.6: http://xlsxwriter.readthedocs.io/changes.html
Thank you very much! That’s what I’d call a quick fix!