3👍
✅
You should use the Format.create_dataset()
method:
from import_export.formats.base_formats import XLS
def your_view():
filehandle = form.cleaned_data['file']
data = bytes()
for chunk in import_file.chunks():
data += chunk
dataset = XLS().create_dataset(data)
result = ExportSpec().import_data(...)
Source:stackexchange.com