Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CalamineError: calamine error: Xlsx error: Expecting alphanumeric character, got 24 #471

Open
keyou666 opened this issue Oct 12, 2024 · 1 comment

Comments

@keyou666
Copy link

I've been trying to read excel file using polars.read_excel, but came across a calamine error: Xlsx error, which states that Expecting alphanumeric character, got 24.

Is there any solution? Many thanks!


data = pl.read_excel(r'D:/MT_PAYDTL-NEW-20568-20241012041604.xlsx', engine='calamine', schema_overrides={"其他税前收入备注": pl.Utf8, "其他税前扣款备注": pl.Utf8, "其他税后扣款备注": pl.Utf8,  "其他税后收入备注": pl.Utf8, "特殊奖金备注": pl.Utf8 },infer_schema_length=None)

data = data.to_pandas()

data = data.where(pd.notnull(data), np.nan)
@tafia
Copy link
Owner

tafia commented Oct 18, 2024

Could you share the workbook so we can inspect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@tafia @keyou666 and others