Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting data from an Excel sheet

How do I load data from an Excel sheet into my Django application? I'm using database PosgreSQL as the database.

I want to do this programmatically. A client wants to load two different lists onto the website weekly and they don't want to do it in the admin section, they just want the lists loaded from an Excel sheet. Please help because I'm kind of new here.

like image 329
user167139 Avatar asked Jun 10 '26 04:06

user167139


1 Answers

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/

like image 112
Pär Wieslander Avatar answered Jun 13 '26 10:06

Pär Wieslander



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!