Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (61 sloc) 2.76 KB

For web developer

The following libraries are written to facilitate the daily import and export of excel data.

framework plugin/middleware/extension
Flask Flask-Excel
Django django-excel
Pyramid pyramid-excel

And you may make your own by using pyexcel-webio

Read any supported excel and respond its content in json

You can find a real world example in examples/memoryfile/ directory: pyexcel_server.py. Here is the example snippet

request.files['excel'] in line 4 holds the file object. line 5 finds out the file extension. line 13 obtains a sheet instance. line 15 uses the first row as data header. line 17 sends the json representation of the excel file back to client browser.

Write to memory and respond to download

make_response is a Flask utility to make a memory content as http response.

Note

You can find the corresponding source code at examples/memoryfile