ver Feb29th

fixed a bug in load_charts
This commit is contained in:
David Chang
2024-02-29 12:07:26 +08:00
parent 2aad4357b2
commit a6c43cc96a

View File

@@ -124,10 +124,14 @@ def load_charts(xlsx_file: Workbook, sheet_name: str, **options) -> Dict[str, An
value_str: str = ser.val.numRef.f
elif hasattr(ser.val, "strRef") and hasattr(ser.val.strRef, "f"):
value_str: str = ser.val.strRef.f
else:
value_str: str = ""
if hasattr(ser.cat, "numRef") and hasattr(ser.cat.numRef, "f"):
categ_str: str = ser.cat.numRef.f
elif hasattr(ser.cat, "strRef") and hasattr(ser.cat.strRef, "f"):
categ_str: str = ser.cat.strRef.f
else:
categ_str: str = ""
series.append("{:},{:}".format(value_str, categ_str))
series: str = ";".join(series)