title: Wrapping text with =HYPERLINK and XlsxWriter
body: <p>I am using Excel's =HYPERLINK function to write hyperlinks in XlsxWriter. I am not using <code>write_url()</code> because my tab names begin with numbers and I also need to show a "friendly" name instead of the hyperlink. (Showing a friendly name does not seem to work with <code>write_url()</code>'s <code>'internal:...'</code> keyword.) The hyperlinking is working just fine but for some reason Excel is not wrapping the hyperlink even though I have set <code>'text_wrap'</code> to <code>True</code>. As you can see in the top picture Excel shows that Wrap Text is set (it is grayed out) but the text is not wrapped. If I click Wrap Text to deselect it, and then click it again to re-select it, it does wrap the text, as seen in the bottom picture.</p>
  
  <p>I am using xlsxwriter 1.0.2 and Excel 2016.</p>
  
  <pre><code>import xlsxwriter
  
  wb = xlsxwriter.Workbook('Wrap.xlsx')
  
  ws = wb.add_worksheet('Test1')
  
  wrap = wb.add_format({'text_wrap': True})
  
  ws.write('A1', '=HYPERLINK("#Sheet1!A1", "A really long name here that does not wrap")', wrap)
  ws.write('B1', 'Bye')
  
  wb.add_worksheet('Sheet1')
  wb.close()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Nga1M.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nga1M.jpg" alt="Link not wrapped"></a></p>
  
  <p><a href="https://i.stack.imgur.com/wEhCq.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wEhCq.jpg" alt="Link wrapped"></a></p>