Code Monkey home page Code Monkey logo

Comments (12)

chfw avatar chfw commented on September 24, 2024

please try install this plugin to support xls file format

 pip install pyexcel-xls

for xlsx, then please install pyexcel-xlsx.

from django-excel.

maltitco avatar maltitco commented on September 24, 2024

I installed both: pyexcel-xls and pyexcel-xlsx

Error: The plugin for file type xlsx is not installed. Please install pyexcel-xls or pyexcel-xlsx

In the console server returns something else:

[01/Jun/2015 09:52:20]"GET /expenses/import/ HTTP/1.1" 200 13234
Depreciated usage. please use dest_file_name
[01/Jun/2015 09:53:06]"POST /expenses/import/ HTTP/1.1" 500 105424

from django-excel.

chfw avatar chfw commented on September 24, 2024

Both of them should appear in your 'pip freeze' listing. In your screenshot, both of them are absent. So, could you double check?

I am going to remove the deprecation warning.

from django-excel.

maltitco avatar maltitco commented on September 24, 2024

This screenschot ist befor install pyexcel-xls and pyexcel-xlsx

now ist pip freeze:

Django==1.8
diff-match-patch==20121119
django-debug-toolbar==1.3.0
django-excel==0.0.2
django-import-export==0.2.8.dev0
future==0.14.3
jdcal==1.0
openpyxl==2.2.2
psycopg2==2.6
pyexcel==0.1.5
pyexcel-io==0.0.4
pyexcel-webio==0.0.2
pyexcel-xls==0.0.7
pyexcel-xlsx==0.0.6
sqlparse==0.1.15
tablib==0.10.0
texttable==0.8.3
wsgiref==0.1.2
xlrd==0.9.3
xlwt-future==0.8.0

from django-excel.

chfw avatar chfw commented on September 24, 2024

Alright, you are there. The next thing is to import it:

import pyexcel.ext.xls # or import pyexcel.ext.xlsx

see this example line: https://github.com/chfw/django-excel/blob/master/polls/views.py#L7

from django-excel.

maltitco avatar maltitco commented on September 24, 2024

Now work ;) - Thanks (I not imported pyexcel.ext.xls because PyCharm mark as unused).

I have a question abaut unique values:

can ignore the values which are already included in the database?

duplicate key value violates unique constraint "expenses_expensestype_expenses_type_key"
DETAIL: Key (expenses_type)=(raz) already exists.

from django-excel.

chfw avatar chfw commented on September 24, 2024

The limitation of the django-excel is the disability to detect value uniqueness and this is left for the developer-user to judge. For example, suppose you have an empty database, you imported your data once. But for some reason, you did the import once more. Under this situation, you may encounter unique key problems.

from django-excel.

srugano avatar srugano commented on September 24, 2024

I'm still getting the same error : Depreciated usage. please use dest_file_name even though I've imported the pyexcel-xls and pyexcel-xlsx

from django-excel.

chfw avatar chfw commented on September 24, 2024

This means 'out_file' parameter is used instead of dest_file_name in save_as or save_book_as functions. Please tell me the versions of pyexcel, pyexcel-webio, and django-excel. I will check.

from django-excel.

srugano avatar srugano commented on September 24, 2024

django-excel==0.0.2
pyexcel==0.1.7
pyexcel-io==0.0.6
pyexcel-ods==0.0.9
pyexcel-webio==0.0.3
pyexcel-xls==0.0.7
pyexcel-xlsx==0.0.6
openpyxl==2.2.2

from django-excel.

chfw avatar chfw commented on September 24, 2024

Your pyexcel related packages are up to date and should not have those depreciated warnings. I have to point out: those deprecation warning is not related to package imports. Is it coming from your own code?

from django-excel.

chfw avatar chfw commented on September 24, 2024

Since the release of auto import feature of pyexcel 0.2.2, explicit imports of all pyexcel plugins in your code files are no longer required. However, you will still need to do pip install the plugins that you want to use.

from django-excel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.