Simple Excel and CSV file Generator
Project description
Simple Excel and CSV File Generator From Django Model.
Required Packages:
pip install pandas
Usage :
Django Models to Excel File:
from django_model_to_excel_csv import generate_excel_file
def func(request):
queryset = User.objects.all().values()
# queryset will be your model data
# file_path : 'your absloute path' or it will store in your project Base Directory
# file_name accepts string : 'string'
# sheet_name accepts string : 'string'
# index and header : Boolean
generate_excel = generate_excel_file.all_to_excel(queryset, file_path, file_name, sheet_name, index, header)
Django Models to CSV File:
from django_model_to_excel_csv import generate_csv_file
def func(request):
queryset = User.objects.all().values()
# queryset will be your model data
# file_path : 'your absloute path' or it will store in your project Base Directory
# file_name accepts string : 'string'
# sheet_name accepts string : 'string'
# index and header : Boolean
generate_excel = generate_excel_file.all_to_excel(queryset, file_path, file_name, sheet_name, index, header)
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_model_to_excel_csv-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e31c48cea00584a1da9efc6e90482af38fb10c0449808c64e263acbecf9153f5 |
|
MD5 | 92eedda35012dfa266457431a9020c89 |
|
BLAKE2b-256 | 2be36b871f08f7ce955b8461af1f9b85d31d3e1d7321cec9af10ead3dd8509aa |
Close
Hashes for django_model_to_excel_csv-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5ace5e4f4f7c486a0d0ecb6ef4d73abaaf37538d74ac52a4c826b7a37e8f0e3 |
|
MD5 | 289c93221b935b01b4a38150c3dd74b3 |
|
BLAKE2b-256 | 00f5cdae55d849ac952198271c4136641f2bda16c70189c9378d3f0d7c49438f |