Python library for handling Excel files (xls | xls

2020-07-06 08:46发布

I need a python library that could read and write Excel files with all formats (i.e xls and xlsx).

I'm new to python and I was using Java before. In Java I was using POI library and it was perfect. I need a python library with the same functionality if possible.

标签: python excel
2条回答
Luminary・发光体
2楼-- · 2020-07-06 09:39

Python excel looks like a go: http://www.python-excel.org/

Also OpenPyXl may have the features you need: http://packages.python.org/openpyxl/

查看更多
我欲成王,谁敢阻挡
3楼-- · 2020-07-06 09:49

I know this thread hasn't been active in a while, but I thought it would be nice to add an answer here since I made a new solution to this problem.

I had this same issue so I went ahead and created a small library that includes python-excel (xlrd, xlwt) and openpyxl within it. You can find it here: https://github.com/camyoung1234/spreadsheet

Then to use it you type the exact same code as openpyxl, except you replace openpyxl with spreadsheet. When you load and save files it looks at the extension and determines which library to use for handling it.

To install it just download it, extract it, rename the folder spreadsheet-master to spreadsheet and place it in PythonXX/Lib/site-packages/ (I've only tested with Python 2.7 but it should work with others)

The README has a few examples to help you get started.

查看更多
登录 后发表回答