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

Replaced Part: /xl/worksheets/sheet1.xml part with XML error. A document must contain exactly one root element. Line 1, column 0. #99

Open
amzar96 opened this issue Oct 19, 2020 · 6 comments

Comments

@amzar96
Copy link

amzar96 commented Oct 19, 2020

L_FB55 tmp

Here is my code when using PyExcelerate

from pyexcelerate import Workbook
def to_excel(df, path, sheet_name="Documents"):
    data = [
        df.columns.tolist(),
    ] + df.values.tolist()
    wb = Workbook()
    wb.new_sheet(sheet_name, data=data)
    wb.save(path)

I can't debug the error because I do not see any value to search. Does anyone know how to fix this?

@kevmo314
Copy link
Collaborator

Do you have a sample dataframe to reproduce the issue?

@amzar96
Copy link
Author

amzar96 commented Oct 20, 2020

Do you have a sample dataframe to reproduce the issue?

I do not know :( I do not have idea why this happen. Before this, I have issue with NULL @ !NUM but already solved. Now this issue come out.

@sgsaikat
Copy link

Hey @amzar96, you mentioned I have issue with NULL @ !NUM but already solved. Can you please let me know your solution ? I'm looking for a work around too.

@kevmo314
Copy link
Collaborator

@sgsaikat do you have a dataframe that you can share to reproduce your issue?

@sgsaikat
Copy link

@kevmo314 Actually, it's not an issue per se. I simply want to replace all the instances of the NULL values with blanks which gets converted to !NUM. In my case, the df.fillna() doesn't work, it errs out.

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

4 participants
@kevmo314 @amzar96 @sgsaikat and others