Django Excel Storage
Project description
Installation
pip install django-excel-storage
Usage
from django_excel_storage import ExcelStorage def excelfunc(): objs = SomeModel.objects.all() fpath = ExcelStorage(data).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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-excel-storage-2.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5a7cd041d96113d0194b700c142adfeb04d61e19a42bf39a19ac8cd0108286f |
|
MD5 | 6ae7e3ce483ab9095a82f9e68139501e |
|
BLAKE2b-256 | 078e1d3e1e79f631435ec5cc184bc0ad9c196afd066af7f19968b46e01a78578 |
Close
Hashes for django_excel_storage-2.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d2902fe5eb4db1f8341877920cff926948471f52fae0b0daec56e015f9bd157 |
|
MD5 | afe98773c6bfa539aeacf825d5d47701 |
|
BLAKE2b-256 | 6a3a678c21088fccb743a7786850cbc3c1b34cef39a5be2ce765cb3c1b78a63a |