excel or ods format for upload datas

This commit is contained in:
Cayo Puigdefabregas 2024-01-10 18:35:12 +01:00
parent 8ee3f561a4
commit 139cae7c87
4 changed files with 4 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -79,7 +79,8 @@ class ImportForm(forms.Form):
if File_datas.objects.filter(file_name=self.file_name, success=True).exists():
raise ValidationError("This file already exists!")
df = pd.read_csv (data, delimiter="\t", quotechar='"', quoting=csv.QUOTE_ALL)
# df = pd.read_csv (data, delimiter="\t", quotechar='"', quoting=csv.QUOTE_ALL)
df = pd.read_excel(data)
data_pd = df.fillna('').to_dict()
if not data_pd:

View File

@ -6,6 +6,8 @@ black==23.9.1
python-decouple==3.8
jsonschema==4.19.1
pandas==2.1.1
xlrd==2.0.1
odfpy==1.4.1
requests==2.31.0
didkit==0.3.2
jinja2==3.1.2