All Projects → tarkatronic → django-excel-response

tarkatronic / django-excel-response

Licence: Apache-2.0 License
Django package to easily render Excel spreadsheets

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to django-excel-response

exoffice
Library to parse common excel formats (xls, xlsx, csv)
Stars: ✭ 31 (-58.11%)
Mutual labels:  csv, excel
Django Data Wizard
🧙⚙️ Import structured data (e.g. Excel, CSV, XML, JSON) into one or more Django models via an interactive web-based wizard
Stars: ✭ 227 (+206.76%)
Mutual labels:  csv, excel
Flutter sheet localization
Generate Flutter localization from a simple online Google Sheets.
Stars: ✭ 212 (+186.49%)
Mutual labels:  csv, excel
Combine Csv Files In The Folder
Tiny script to automate everyday task
Stars: ✭ 91 (+22.97%)
Mutual labels:  csv, excel
awesome-georgian-datasets
Useful datasets, specific to Georgia
Stars: ✭ 47 (-36.49%)
Mutual labels:  csv, excel
Elasticsearch Dataformat
Excel/CSV/BulkJSON downloads on Elasticsearch.
Stars: ✭ 135 (+82.43%)
Mutual labels:  csv, excel
Portphp
Data import/export framework for PHP
Stars: ✭ 225 (+204.05%)
Mutual labels:  csv, excel
Magicodes.ie
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.
Stars: ✭ 1,198 (+1518.92%)
Mutual labels:  csv, excel
eec
A fast and lower memory excel write/read tool.一个非POI底层,支持流式处理的高效且超低内存的Excel读写工具
Stars: ✭ 93 (+25.68%)
Mutual labels:  csv, excel
fastapi-csv
🏗️ Create APIs from CSV files within seconds, using fastapi
Stars: ✭ 46 (-37.84%)
Mutual labels:  csv, excel
Filecontextcore
FileContextCore is a "Database"-Provider for Entity Framework Core and adds the ability to store information in files instead of being limited to databases.
Stars: ✭ 91 (+22.97%)
Mutual labels:  csv, excel
sheet2dict
Simple XLSX and CSV to dictionary converter
Stars: ✭ 206 (+178.38%)
Mutual labels:  csv, excel
Tabtoy
高性能表格数据导出器
Stars: ✭ 1,302 (+1659.46%)
Mutual labels:  csv, excel
Weihanli.npoi
NPOI Extensions, excel/csv importer/exporter for IEnumerable<T>/DataTable, fluentapi(great flexibility)/attribute configuration
Stars: ✭ 157 (+112.16%)
Mutual labels:  csv, excel
Dbwebapi
(Migrated from CodePlex) DbWebApi is a .Net library that implement an entirely generic Web API (RESTful) for HTTP clients to call database (Oracle & SQL Server) stored procedures or functions in a managed way out-of-the-box without any configuration or coding.
Stars: ✭ 84 (+13.51%)
Mutual labels:  csv, excel
Docto
Simple command line utility for converting .doc & .xls files to any supported format such as Text, RTF, CSV or PDF
Stars: ✭ 220 (+197.3%)
Mutual labels:  csv, excel
Fast Excel
🦉 Fast Excel import/export for Laravel
Stars: ✭ 1,183 (+1498.65%)
Mutual labels:  csv, excel
Myexcel
MyExcel, a new way to operate excel!
Stars: ✭ 1,198 (+1518.92%)
Mutual labels:  csv, excel
Vscode Data Preview
Data Preview 🈸 extension for importing 📤 viewing 🔎 slicing 🔪 dicing 🎲 charting 📊 & exporting 📥 large JSON array/config, YAML, Apache Arrow, Avro, Parquet & Excel data files
Stars: ✭ 245 (+231.08%)
Mutual labels:  csv, excel
MiniExcel
Fast, Low-Memory, Easy Excel .NET helper to import/export/template spreadsheet
Stars: ✭ 996 (+1245.95%)
Mutual labels:  csv, excel

django-excel-response

Latest Version Test/build status Code coverage

A subclass of HttpResponse which will transform a QuerySet, or sequence of sequences, into either an Excel spreadsheet or CSV file formatted for Excel, depending on the amount of data.

Installation

pip install django-excel-response

Provided Classes

  • excel_response.response.ExcelResponse

    Accepted arguments:

    • data - A queryset or list of lists from which to construct the output
    • output_filename - The filename which should be suggested in the http response, minus the file extension (default: excel_data)
    • worksheet_name - The name of the worksheet inside the spreadsheet into which the data will be inserted (default: None)
    • force_csv - A boolean stating whether to force CSV output (default: False)
    • header_font - The font to be applied to the header row of the spreadsheet; must be an instance of openpyxl.styles.Font (default: None)
    • data_font - The font to be applied to all data cells in the spreadsheet; must be an instance of openpyxl.styles.Font (default: None)
  • excel_response.views.ExcelMixin

  • excel_response.views.ExcelView

Examples

Function-based views

You can construct your data from a queryset.

from excel_response import ExcelResponse


def excelview(request):
    objs = SomeModel.objects.all()
    return ExcelResponse(objs)

Or you can construct your data manually.

from excel_response import ExcelResponse


def excelview(request):
    data = [
        ['Column 1', 'Column 2'],
        [1,2]
        [23,67]
    ]
    return ExcelResponse(data, 'my_data')

Class-based views

These are as simple as import and go!

from excel_response import ExcelView


class ModelExportView(ExcelView):
    model = SomeModel
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].