Add support for image hyperlinks
Created originally on Bitbucket by Darak Dir
I have a excel workbook(Fruits.xlsx) which has two worksheets(TableOfContents and Orange). Orange worksheet has a bmp image with an hyperlink to TableOfContents worksheet). I change color of the Orange worksheet tab, save and close the workbook. When opening again, the hyperlink on bmp image in Orange worksheet to TableOfContents doestn’t work.
Below is my code:-
def colorTab(filepath,color,sheet=''):
if sheet=='':
wb = load_workbook(filepath)
for ws in wb.worksheets:
ws.sheet_properties.tabColor = color
wb.save()
wb.close()
Attachments: FruitsOutput.xlsxFruitsInput.xlsx