xls (Excel file) to 2D array in Python?

how can I read/import an xls file to a 2D array in Python?

In case of formulas, do it read the raw text of the formula or its resulting value?
lucavillaAsked:
Who is Participating?
 
peprConnect With a Mentor Commented:
My personal experience is that you need MS Excel installed on the machine, and that you should use the Excel components to work with the .xls files reliably.  However, you can find some alternative tools like the ones at http://www.python-excel.org/.  The Download links point to PyPI repository.  You can find there the 56 pages PDF tutorial with "Working with Excel files in Python" by Chris Withers with help from John Machin that was presented at EuroPython 2009 in Birmingham.

I know nothing about the quality of the tools; however, it could be (at least) the good point to start from.

0
 
theKashyapConnect With a Mentor Commented:
There are existing packages you can reuse.
Simplest would be if you can "Save as.." the excel as a csv file then you can use the built-in csv handler package: http://docs.python.org/library/csv.html
Else use: http://pypi.python.org/pypi/xlrd (documentation available here: http://www.python-excel.org/)
0
 
James MurrellProduct SpecialistCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.