I am using python xlsxwriter library to create excel. I need to apply background color to the cell for that I am using set_column method. All columns getting backgroundcolor except the column containing hyperlink. I tried various ways i can try with but not able to found anything. Cell format is working with write_rows but not with set_column containing hyperlink. Can anybody please help.
Sample Code:
workbook = xlsxwriter.Workbook('hello.xlsx')
worksheet = workbook.add_worksheet()
cell_format = workbook.add_format()
cell_format.set_bg_color('green')
worksheet.write('A1', 'https://google.com')
worksheet.set_column(0, 0, None, cell_format)
workbook.close()
Output:
All columns have green color except having url.
