Getting data from an Excel sheet Getting data from an Excel sheet postgresql postgresql

Getting data from an Excel sheet


Have a look at the xlrd package, which allows you to read Excel files in Python. Once you've read the data you can do whatever you want with it, including saving it to the database.

For a basic usage example, look at http://scienceoss.com/read-excel-files-from-python/


Use django-batchimport http://code.google.com/p/django-batchimport/ It provides a very simple way to upload data in Excel sheets to your Django models. I have used it in a couple of projects. It can be integrated very easily into your existing Django project.

Read the documentation on the project page to know how to use it.

It is built on XLRD.


Have a look at the presentation "Excel & Python" that Chris Withers gave at PyCon US:

"This lightning talk explains that you don't need to use COM or be on Windows to read and write native Excel files."

http://www.simplistix.co.uk/presentations/python_excel_09/excel-lightning.pdf