I recently published my first open source library called pylightxl. It is a light weight excel reader (soon to be writer) that was written from bottom up with zero dependencies (only standard lib libraries used are: zipfile, re, os and sys). For a single source file (single version) it supports python 2.7 and 3+ so you don’t have to worry about compatibilities. It is 100% test driven development aimed to be as pythonic as possible without any bells or whistles; it just reads cell data and returns easy to work with lists and iterators for rows/cols.
I would be honored if you guys could also share it with your audience on python-excel.org! It has been a great pleasure to be able to contribute back to the python community and I have received so many great feedback in processes of developing this library.
Please take a look, hope you like it as well:
Docs: https://pylightxl.readthedocs.io
GitHub: https://github.com/PydPiper/pylightxl
Pypi: https://pypi.org/project/pylightxl/
Best,
Viktor Kis
--
You received this message because you are subscribed to the Google Groups "python-excel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-excel...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/python-excel/d39eb609-d82a-4582-88db-90aca3a66642%40googlegroups.com.
Viktor,thank you so much for your work and sharing it.Could I humbly ask you about this design choice:"Worksheet data size is consistent for each row/col. Any data that is empty will return a ‘’ "I read this as "empty cells will be returned as String with length zero aka empty string"What make you choose empty string instead of None?I am asking this because Oracle made a similar design choice (empty string equals NULL, (with NULL being the SQL-similiar to None)).A design choice that was not shared by the SQL-Standard committee and which continues to huntdevelopers forever.CheersHarald
On Fri, 3 Jan 2020 at 12:54, Viktor Kis <vkisf...@gmail.com> wrote:
--Hello everyone,I recently published my first open source library called pylightxl. It is a light weight excel reader (soon to be writer) that was written from bottom up with zero dependencies (only standard lib libraries used are: zipfile, re, os and sys). For a single source file (single version) it supports python 2.7 and 3+ so you don’t have to worry about compatibilities. It is 100% test driven development aimed to be as pythonic as possible without any bells or whistles; it just reads cell data and returns easy to work with lists and iterators for rows/cols.
I would be honored if you guys could also share it with your audience on python-excel.org! It has been a great pleasure to be able to contribute back to the python community and I have received so many great feedback in processes of developing this library.
Please take a look, hope you like it as well:
Docs: https://pylightxl.readthedocs.io
GitHub: https://github.com/PydPiper/pylightxl
Pypi: https://pypi.org/project/pylightxl/
Best,
Viktor Kis
You received this message because you are subscribed to the Google Groups "python-excel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/python-excel/d39eb609-d82a-4582-88db-90aca3a66642%40googlegroups.com.
I must say I was not aware that the SQL standard committee preferred to use Null/None for empty cell data,
but from a user standpoint (which is where I was/is trying to tailor the API) I have many hours of pain dealing with pandas numpy NaN, trying to iterate over data that's expected to be some form of int, float, str type.
Now on the excel side of things, a cell equal to an empty cell actually returns 0, which was my first hard decision because I wanted to make the API as excel-like friendly as possible but returning 0 for a cell that has nothing in it posed too many issue when trying to view the data (ex: no distinction between no-data versus measured 0 value data). Therefore an empty string became the next solution, which in python works out great for if statements as well
To unsubscribe from this group and stop receiving emails from it, send an email to python-excel...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/python-excel/ca0521c6-baa1-4c2d-ad34-ef9838aab0f5%40googlegroups.com.
My question: as returning 0 for no-data became an issue immediately, are you sure returning empty-string for no datawill be fine for the future?My decision would have been to escalate that decision to the apis user and return None.If she thinks "empty string" is good, that is a list comprehension away, the same with 0.
To view this discussion on the web, visit https://groups.google.com/d/msgid/python-excel/ca0521c6-baa1-4c2d-ad34-ef9838aab0f5%40googlegroups.com.
One thing that xlrd has, which allows you to distinguish between an
empty cell and a text cell containing an empty string, is that it
gives you the "Excel type" of each cell (if you want it), and the
"empty cell" type is different from the "text cell" type.