Jan-17-2020, 08:51 AM
(This post was last modified: Jan-17-2020, 09:38 AM by abt_python.)
Hi,
I need to process only that sheet from given excel file whose tab color is YELLOW. Requirement is something like this. My users have an excel file. They highlight the tab in YELLOW color which they modified. So I need to convert only those sheets to csv for further processing. I have code for excel to csv using pandas. But I am not able to identify those sheets only with YELLOW colored. I really appreciate your help here.
I tried using openpyxl, still no luck
ex:
ws2.sheet_properties.tabColor.value gave the intended answer
I need to process only that sheet from given excel file whose tab color is YELLOW. Requirement is something like this. My users have an excel file. They highlight the tab in YELLOW color which they modified. So I need to convert only those sheets to csv for further processing. I have code for excel to csv using pandas. But I am not able to identify those sheets only with YELLOW colored. I really appreciate your help here.
I tried using openpyxl, still no luck
ex:
>>> print(ws2.sheet_properties.tabColor) <openpyxl.styles.colors.Color object> Parameters: rgb='FF00B050', indexed=None, auto=None, theme=None, tint=0.0, type='rgb'Thanks,
ws2.sheet_properties.tabColor.value gave the intended answer