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
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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9a56b2a41f665dee7dde649050d7f2bd2d5a084ba1115c11576a1df0f215ab2 |
|
MD5 | b8b0eca7d4aaeb6d9096a9d2d95c85c4 |
|
BLAKE2b-256 | 2c97c6b608695c3a3ca556bd2ecceeed28dffe8ac945fe7d8c1385bbab3d9076 |
Close
Hashes for django_excel_storage-2.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80443f4028bc9d341e9afeb6a8e6557b6428267e4a781482251d9c13a9e7090a |
|
MD5 | acd2a1226ed2df3bfd33b5bcfaeb32f3 |
|
BLAKE2b-256 | e18028e7946459304ef515a19eb9a103c1b662898b398e8ef6f1bafcfe416212 |