I want to parse excel document to lists in Python.
Is there a python library which is helpful for this action?
And what functions are relevant in that library?
I want to parse excel document to lists in Python. Is there a python
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re best bet for parsing Excel files would be the xlrd library. The python-excel.org site has links and examples for xlrd and related python excel libraries, including a pdf document that has some good examples of using xlrd. Of course, there are also lots of related xlrd questions on StackOverflow that might be of use.
One caveat with the xlrd library is that it will only work withxls(Excel 2003 and earlier versions of excel) file formats and not the more recentxlsxfile format. There is a newer library openpyxl for dealing with thexlsx, but I have never used it.UPDATE:
As per John’s comment, the xlrd library now supports both
xlsandxlsxfile formats.Hope that helps.