django-excel is based on pyexcel and makes it easy to consume/produce information stored in excel files over HTTP protocol.
Questions tagged [django-excel]
26 questions
8
votes
2 answers
pyexcel export error "No content, file name. Nothing is given"
I'm using django-pyexcel to export data from the website, but when I go to the export URL I get the error:
Exception Type: IOError
Exception Value: No content, file name. Nothing is given
The code to export the data was copied from the example…

Tony
- 9,672
- 3
- 47
- 75
4
votes
0 answers
Django excel save_book_to_database() broken in latest version using Django 1.8
I've been going through the django excel documentation using Django 1.8, but haven't been able to get save_book_to_database(...) to work.
It either fails silently or gives the following error:
'tuple' object has no attribute '_meta'
I have…

John Smith
- 843
- 2
- 9
- 21
3
votes
1 answer
Django upload form, additional field causing error
There is an issue I'm facing. I need to upload an excel of students containing their related data. I also need to have, as an user-input, the batch of the student. Following are my codes:
Views.py
def import_student(request):
…

Sayantan
- 315
- 5
- 20
2
votes
1 answer
Converting texts to foreign keys when importing data with Django excel
Tbl.1
id
author
brand_id
name
barcode
unit
user1
TestBrand1
Product1
TST1234
700
user2
TestBrand2
Product2
TST5678
380
I have an excel spreadsheet as in the example above. The author and brand_id in the table fields represent the…

Eric Maniel
- 102
- 4
2
votes
0 answers
How to do field validation in django-import-export for .xls file
I am using Django import and export and importing data from .xls file and now I want to validate the col 2 value should not be empty for that I have used the below code but it is working for the admin site and not for data which is uploaded from an…

Shailesh
- 135
- 9
2
votes
1 answer
Make django ajax view return a file
I'm having trouble when trying to return a file through a view.
Working case:
User submits a form, I instanciate an excel file from these values and return it to the user. After submitting, user got a popup inviting him to download the file. No…

May.D
- 1,832
- 1
- 18
- 34
2
votes
0 answers
How to import xls/xlsx in django models?
I'm using django-excel to do this function.
This is my view.py
def import_data(request):
if request.method == "POST":
form = UploadFileForm(request.POST, request.FILES)
if form.is_valid():
…

Gusan
- 411
- 3
- 5
- 19
1
vote
1 answer
How to skip some rows that have errors in django-excel using save_to_database()
I'm usign django-excel library in my Django project, and I want to skip some rows before save it to the database using the save_to_database() method.
I have something like the following:
file = form.cleaned_data['file']
file.save_to_database(
…

allexiusw
- 1,533
- 2
- 16
- 23
1
vote
1 answer
How to show an excel file in Django webpage
I am new to Django and I have a Django application where once you upload few excel files, it does a background calculation and saves the results in an excel file. I need to show those excel files with minimal processing in the Django home page as…

neel1923
- 21
- 1
- 2
1
vote
1 answer
Changing border of group of cells in excell to thick box border with xlsxwriter
I am trying to change box border of some excell cells to "Thick Box Border". I am using django 1.9.5 and python 2.7.5 and xlsxwriter for excell.
import xlsxwriter
workbook = xlsxwriter.Workbook('bordertest.xlsx')
worksheet =…

ivbtar
- 799
- 11
- 29
1
vote
2 answers
How to i transpose rows and columns in Django excel export file
Here is the sample code which i am struggling to transpose the data
def export_users_xls(request):
response = HttpResponse(content_type='application/ms-excel')
response['Content-Disposition'] = 'attachment; filename="users.xls"'
wb =…

Access_Doomer
- 69
- 2
- 8
1
vote
1 answer
TypeError: export_users_xls() missing 1 required positional argument: 'request'
when I am trying to run i got this error
File "/home/normsoftware/WORK/JVB/healthtracker/quicklook/urls.py", line 39, in
url(r'^users/print$',views.export_users_xls(),name="Exceldata"),
TypeError: export_users_xls() missing 1 required…

Harshavardhan
- 73
- 8
1
vote
0 answers
Manipulate Excel Data Before Adding to Database with Django - Order of Operations?
I receive 6 weekly excel reports that I've been manually compiling into a very large monthly report. Each report has between 5-30 columns, and 4000 to 130,000 rows.
I'm putting together a simple Django app that allows you to upload each report, and…

Evan H
- 41
- 8
1
vote
0 answers
Upload a relatively big excel in Django and improve the write speed (Postgresql)
I am uploading a 4000 row excel in Django (I'm using django-excel as an external plugin), which is taking around 17 seconds. This sounds very low in comparison to a normal POSTGRESQL write qps (queries per second) expected to be about 600-700.To…

Sayantan
- 315
- 5
- 20
1
vote
1 answer
How to explode text in one column from excel into 2 model in django?
I have a problem when exploding text from one column in ms excel and insert it into 2 column in Django models.
this is my views.py
class UploadFileForm(forms.Form):
file = forms.FileField()
def import_data(request):
if request.method ==…

Gusan
- 411
- 3
- 5
- 19