| CARVIEW |
edspencer / Ext.ux.Exporter
- Source
- Commits
- Network (2)
- Issues (1)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
-
Branches (1)
- master ✓
- Tags (0)
Pledgie Donations
Once activated, we'll place the following badge in your repository's detail box:
Exports an Ext.data.Store to Excel or CSV — Read more
| name | age | message | |
|---|---|---|---|
| |
Base64.js | Thu Aug 13 16:40:37 -0700 2009 | Initial commit - basic store/grid exporting in ... [Ed Spencer] |
| |
Button.js | Mon Nov 23 17:57:35 -0800 2009 | Added a README and simple example [edspencer] |
| |
CSVFormatter/ | Thu Aug 13 16:40:37 -0700 2009 | Initial commit - basic store/grid exporting in ... [Ed Spencer] |
| |
ExcelFormatter/ | Thu Aug 13 18:51:51 -0700 2009 | Tweaks [Ed Spencer] |
| |
Exporter-all.js | Mon Nov 23 17:59:22 -0800 2009 | Regenerated Exporter-all.js [edspencer] |
| |
Exporter.js | Thu Aug 13 18:51:51 -0700 2009 | Tweaks [Ed Spencer] |
| |
Formatter.js | Thu Aug 13 16:40:37 -0700 2009 | Initial commit - basic store/grid exporting in ... [Ed Spencer] |
| |
README.textile | Mon Nov 23 18:01:25 -0800 2009 | Fixed README [edspencer] |
| |
build | Fri Aug 21 04:57:46 -0700 2009 | Renamed include_order.txt to build [Ed Spencer] |
| |
example/ | Mon Nov 23 17:57:35 -0800 2009 | Added a README and simple example [edspencer] |
Ext.ux.Exporter
About
Exporter is a generic export class which takes any Ext.data.Store-based component (e.g. grids and similar) and exports the data in any format.
Exporter works completely client-side. It uses a Formatter class to generate a document (.xls, .csv etc) and then redirects the user’s browser to a data url so that they can view or download it.
Installation
Download the latest version in any of the following ways:
- git clone git://github.com/edspencer/Ext.ux.Exporter.git
- Download from https://github.com/edspencer/Ext.ux.Exporter/zipball/master
- Copy/paste Exporter-all.js from https://github.com/edspencer/Ext.ux.Exporter/blob/master/Exporter-all.js
To install Ext.ux.Exporter, just include Exporter-all.js somewhere on your page:
<script type="text/javascript" src="Exporter-all.js"></script>
Usage
The most common use case for the Exporter is exporting a grid to Excel, which is as simple as doing the following:
var grid = new Ext.grid.GridPanel({
store: someStore,
tbar : [
{
xtype: 'exportbutton',
store: someStore
}
],
//your normal grid config goes here
});
The provided ‘exportbutton’ is just a specialised Ext.Button subclass which redirects the user to the generated data url. If you want to provide your own implementation here, just check out the Button.js code (it’s ridiculously simple).
Example
Download or clone the code (see Installation section for details) and then drag the example/index.html file into any browser to see an example of the Exporter at work.
