猿问

使用xlsxwriter条件格式化(公式)后删除列

我有一列(列V),我曾经使用引擎xlsxwriter有条件地格式化另一列(列U)。


所以我有这个:


# 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})

因此,现在在使用条件格式突出显示列U之后,我要删除列V(但保持突出显示不变)。有没有办法在xlsxwriter中做到这一点?



慕沐林林
浏览 553回答 1
1回答
随时随地看视频慕课网APP

相关分类

Python
我要回答