I have a column (column V) that I used to conditionally format another column (column U) using engine xlsxwriter.
So I have this:
# Light yellow fill with dark yellow text.
format1 = workbook.add_format({'bg_color': '#FFEB9C'})
# Light red fill with dark red text.
format2 = workbook.add_format({'bg_color': '#FFC7CE',
'font_color': '#9C0006'})
worksheet.conditional_format('U2:U1000', {'type': 'formula',
'criteria': '=V2>25',
'format': format1})
worksheet.conditional_format('U2:U1000', {'type': 'formula',
'criteria': '=V2<-20',
'format': format2})
So now after highlighting column U with conditional formatting, I want to delete column V (yet keep the highlighting intact). Is there a way to do this in xlsxwriter?
worksheet.set_column('V:W', None, None, {'hidden' : True})
still only hides 'V'. I wrote two separate lines to hide two columns. – Invisible