Skip to main content

Django Excel Storage

Project description

django-excel-storage

Django Excel Storage

Installation

pip install django-excel-storage

Usage

from django_excel_storage import ExcelStorage

def excelfunc():
    objs = SomeModel.objects.all()
    fpath = ExcelStorage(objs).save()

or

from django_excel_storage import ExcelStorage

def excelfunc():
    data = [
        {
            'Column 1': 1,
            'Column 2': 2,
        },
        {
            'Column 1': 3,
            'Column 2': 4,
        }
    ]
    fpath = ExcelStorage(data, 'my_data', font='name SimSum').save()

or

from django_excel_storage import ExcelStorage

def excelfunc():
    data = [
        ['Column 1', 'Column 2'],
        [1, 2],
        [3, 4]
    ]
    fpath = ExcelStorage(data, 'my_data', font='name SimSum').save()

or

from django_excel_storage import ExcelStorage

def excelfunc():
    data = [
        ['Column 1', 'Column 2'],
        [1, [2, 3]],
        [3, 4]
    ]
    fpath = ExcelStorage(data, 'my_data', font='name SimSum', row_merge=True).save()

Params

  • font='name SimSum'
    • Set Font as SimSum(宋体)
  • force_csv=True
    • CSV Format? True for Yes, False for No, Default is False

CSV

datas = [
    [u'中文', ]
]
Win Excel 2013 Mac Excel 2011 Mac Excel 2016 Mac Numbers
UTF8 Messy Messy Messy Normal
GB18030 Normal Normal Normal Messy
UTF8 + BOM_UTF8 Normal Messy Normal Normal
UTF16LE + BOM

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-excel-storage-2.0.5.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

django_excel_storage-2.0.5-py2.py3-none-any.whl (3.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-excel-storage-2.0.5.tar.gz.

File metadata

  • Download URL: django-excel-storage-2.0.5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.2

File hashes

Hashes for django-excel-storage-2.0.5.tar.gz
Algorithm Hash digest
SHA256 4f617b99aa5f9308886add98a8954997f931b01204becf2e80e08790b01decf4
MD5 b313fd458fb88b1a28be6bf971a42525
BLAKE2b-256 9829ea795504e27c282a0bd3a3e124e3219618387fd66a75de40ab31aa5a9afb

See more details on using hashes here.

File details

Details for the file django_excel_storage-2.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: django_excel_storage-2.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.2

File hashes

Hashes for django_excel_storage-2.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7692d506ff143d9a91d386c5ec2ea8c8d66af9ab0285348b3757f3264fc5f403
MD5 853988c72ade26aaf89b3520af68efb8
BLAKE2b-256 6580ca63aa5a0c32e506f2f2c55554416e90e51eac27754759619c63d6437c23

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page