Retrieving data from an Excel worksheet

How to load data from an Excel sheet into a Django application? I am using a PosgreSQL database as a database.

I want to do this programmatically. The client wants to upload two different lists to the website on a weekly basis, and they do not want to do this in the admin section, they just want the lists to be downloaded from an Excel sheet. Please help, because I'm a little new here.

+3
source share
9 answers

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

http://scienceoss.com/read-excel-files-from-python/

+6

django-batchimport http://code.google.com/p/django-batchimport/ Excel Django. . Django.

, , .

XLRD.

+3
+2

? , excel CSV ( csv txt) Postgresql,

copy the_data from '/path/to/csv/MYFILE.txt' DELIMITERS ',' CSV;
0

SQLAlchemy, - script, . (http://www.sqlalchemy.org/)

0
0

django-batchimport xlrd, . , , Django. xlrd. . .

, django-batchimport . : http://code.google.com/p/django-batchimport/

0

Just started using XLRD and it looks very simple and easy to use.

Beware that it does not yet support Excel 2007, so keep in mind your advantage in the 2003 format.

-1
source

Source: https://habr.com/ru/post/1723082/


All Articles