Giter VIP home page Giter VIP logo

Comments (10)

bmihelac avatar bmihelac commented on May 14, 2024

Check if you have dev version of tablib installed.

from django-import-export.

grillazz avatar grillazz commented on May 14, 2024

tablib 0.9.11
xlrd 0.9.2
openpyxl 1.6.2

from django-import-export.

bmihelac avatar bmihelac commented on May 14, 2024

This is 2 years old, install dev version. See
https://github.com/bmihelac/django-import-export/issues/20#issuecomment-21094655

from django-import-export.

grillazz avatar grillazz commented on May 14, 2024

Installed but still have no xlxs option to import/export.

I found in admin.py below. Maybe need to add XLSX ?

#: import / export formats
DEFAULT_FORMATS = (
    base_formats.CSV,
    base_formats.XLS,
    base_formats.TSV,
    base_formats.ODS,
    base_formats.JSON,
    base_formats.YAML,
    base_formats.HTML,
)

from django-import-export.

grillazz avatar grillazz commented on May 14, 2024

ok add and can export but no option for import

DEFAULT_FORMATS = (
    base_formats.XLSX,
)

from django-import-export.

bmihelac avatar bmihelac commented on May 14, 2024

sorry, I thought you are asking for xls and not xlsx. Does tablib
support both reading and writing to this format? If so, it is easy to add
it to django-import-export. Patch would be welcomed.

best,
Bojan

from django-import-export.

grillazz avatar grillazz commented on May 14, 2024

in overview I can see this "Datasets can be imported from JSON, YAML, and CSV; they can be exported to XLSX, XLS, ODS, JSON, YAML, CSV, TSV, and HTML." I know there is openpyxl in tablib. Just not sure about importing XLSX format.
I added below and export is working fine.

DEFAULT_FORMATS = (
    base_formats.XLSX,
)

Could you give clue where i should start to add import for XLSX in django-import-export.

Tanks,
Jakub

from django-import-export.

bmihelac avatar bmihelac commented on May 14, 2024

quick check shows that tablib does not have support to import xlsx:

https://github.com/kennethreitz/tablib/blob/develop/tablib/formats/_xlsx.py

if xlsx importing matters, you would have to write import_book support.

see existing xls tablib importer
https://github.com/kennethreitz/tablib/blob/develop/tablib/formats/_xls.py

from django-import-export.

grillazz avatar grillazz commented on May 14, 2024

Thx will try

from django-import-export.

itatelier avatar itatelier commented on May 14, 2024

i had seen xlsx option in import formats only after install openpyxl (openpyxl-2.4.0) python module

from django-import-export.

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.