def write_worksheet_hyperlinks(doc, worksheet):
 write_hyperlinks = False
 for cell in worksheet.get_cell_collection():
  if (cell.hyperlink_rel_id is not None):
   write_hyperlinks = True
   break
 if write_hyperlinks:
  start_tag(doc, 'hyperlinks')
  for cell in worksheet.get_cell_collection():
   if (cell.hyperlink_rel_id is not None):
    attrs = {'display': cell.hyperlink, 'ref': cell.get_coordinate(), 'r:id': cell.hyperlink_rel_id}
    tag(doc, 'hyperlink', attrs)
  end_tag(doc, 'hyperlinks')

def write_worksheet_hyperlinks ( doc , worksheet ) : write_hyperlinks = False for cell in worksheet . get_cell_collection ( ) : if ( cell . hyperlink_rel_id is not None ) : write_hyperlinks = True break if write_hyperlinks : start_tag ( doc , 'hyperlinks' ) for cell in worksheet . get_cell_collection ( ) : if ( cell . hyperlink_rel_id is not None ) : attrs = { 'display' : cell . hyperlink , 'ref' : cell . get_coordinate ( ) , 'r:id' : cell . hyperlink_rel_id } tag ( doc , 'hyperlink' , attrs ) end_tag ( doc , 'hyperlinks' )
write worksheet hyperlinks to xml .