Skip to content

Unittests relying on the xlrd lib fail -> skip xlrd ? #915

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

Closed
alixdamman opened this issue Feb 18, 2021 · 4 comments
Closed

Unittests relying on the xlrd lib fail -> skip xlrd ? #915

alixdamman opened this issue Feb 18, 2021 · 4 comments

Comments

@alixdamman
Copy link
Collaborator

The xlrd does no longer support other extension than .xls for Excel files.

From this link:

This library will no longer read anything other than .xls files. For alternatives that read newer file formats, please see http://www.python-excel.org/.

@gdementen Do we remove xlrd from the installed libraries in the .travis.yml script and skip unittest relying on xlrd ?
Or we adapt the unittests ?

@alixdamman alixdamman self-assigned this Feb 18, 2021
@alixdamman alixdamman changed the title Unittests relying on the xlrd lib fails -> skip xlrd ? Unittests relying on the xlrd lib fail -> skip xlrd ? Feb 18, 2021
@gdementen
Copy link
Contributor

can't we replace xlrd by openpyxl in .travis.yml and avoid changing anything else in our tests?

@alixdamman
Copy link
Collaborator Author

can't we replace xlrd by openpyxl in .travis.yml and avoid changing anything else in our tests?

We also need to replace needs_xlrd by needs_openpyxl.

The question is more about do we still want to support the old .xls format ?
In other words, do our users still receive Excel documents in the .xls format from outside ?

alixdamman added a commit to alixdamman/larray that referenced this issue Feb 19, 2021
…Excel files with the standard .xlsx extension
@gdementen
Copy link
Contributor

I don't know. In any case, it does not cost us much to leave xlrd in larrayenv but we can get away without adding an explicit test for .xls files I think.

alixdamman added a commit to alixdamman/larray that referenced this issue Feb 19, 2021
…Excel files with the standard .xlsx extension
@alixdamman
Copy link
Collaborator Author

I don't know. In any case, it does not cost us much to leave xlrd in larrayenv but we can get away without adding an explicit test for .xls files I think.

OK

alixdamman added a commit to alixdamman/larray that referenced this issue Feb 19, 2021
…Excel files with the standard .xlsx extension
alixdamman added a commit to alixdamman/larray that referenced this issue Feb 22, 2021
- use openpyxl engine instead of xlrd in PandasExcelHandler to read Excel files with the standard .xlsx extension
- use xlsxwriter by default if installed in PandasExcelHandler
- dropped tests for blank cells when reading Excel files with openpyxl
- added xlrd in travis.yml to fix error for Python 3.6 (pandas is asking to install xlrd)
gdementen pushed a commit to gdementen/larray that referenced this issue Nov 30, 2021
- use openpyxl engine instead of xlrd in PandasExcelHandler to read Excel files with the standard .xlsx extension
- use xlsxwriter by default if installed in PandasExcelHandler
- dropped tests for blank cells when reading Excel files with openpyxl
- added xlrd in travis.yml to fix error for Python 3.6 (pandas is asking to install xlrd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants