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

QXlsx is unable to read the contents of xlsx files created by Openpyxl. #366

Open
lp92321 opened this issue Oct 31, 2024 · 1 comment
Open

Comments

@lp92321
Copy link

lp92321 commented Oct 31, 2024

Environment: Ubuntu 20.04, Qt5.14.1, Python3.8.10, Pip 20.0.2, Openpyxl3.0.9/Openpyxl3.1.5
In the above environment, I used Python to call openpyxl to create an xlsx file and write a string into it, then saved it as "openpyxl_create.xlsx". Afterwards, when I tried to read the content of openpyxl_create.xlsx using a Qt project with QXlsx, I found that the reading failed. Only after first saving the openpyxl_create.xlsx file as an Excel 2007-365 formatted xlsx file using LibreOffice Calc, was QXlsx able to read the file's content. This method yielded the same test results for both openpyxl3.0.9 and openpyxl3.1.5. I hope QXlsx can directly read and write files created by openpyxl and that openpyxl can directly read and write files created by QXlsx; that would be really cool.

@lp92321
Copy link
Author

lp92321 commented Oct 31, 2024

Here is the Python script I wrote to generate an xlsx file:
import openpyxl
path = './exa.xlsx'
wb = openpyxl.Workbook()
sheet = wb.active
record_data = ['step','loss']
sheet.append(record_data)
wb.save(path)
wb.close()

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

1 participant