Skip to content
Advertisement

Tag: excel

XLWINGS conditional formatting based on value

I have a dataframe in Pandas that I have exported to Excel and formatted headers etc. using XLWINGS. That works like a charm. But I would like to format two columns based on their value in each cell (row), so if the value is above 0 then green and below zero then red. I can’t seem to find that option

How to scroll down to last row with data?

I have an Excel file with many rows and it gets many entries daily. That’s why I would like to scroll down the file to last row with data. To find the last row, I use: How could I scroll down to it using Python (and preferably XLWings module)? Answer Use used_range, it’s more robust than expand(“down) or end(“down”), if

Advertisement