If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!
rcb_excel
Summary
Outputs the specified Microsoft Excel (.xls) file as an xHTML table. Includes server-side caching for optimum performance.
This plugin is ideal for enabling clients to publish/maintain tabular data without having to know xHTML. A new xHTML table is created and cached every time a new version of the spreadsheet is uploaded.
Basic usage
<txp:rcb_excel file="spreadsheet.xls" />
The file attribute accepts either the name or ID of an uploaded MS Excel (.xls) file.
Note: the plugin will attempt to create a cache directory in your files directory. If PHP lacks the permissions to do this, you will need to create the directory yourself. The default name for this directory is cache, though you can call it whatever you want. If you choose a different name, remember to use the cachedir attribute (see below).
Additional tag attributes
Attribute | Description | Default |
---|---|---|
file | The Microsoft Excel source file. Accepts either a filename or file ID. The file must already have been uploaded from within the ‘Files’ tab in your Textpattern control panel. | unset |
sheet | The worksheet number to output. | 1 |
style | Whether to retain the worksheet’s formatting styles (1) or return unstyled data and markup (0, default). | 0 |
showrownumbers | Whether or not to output the spreadsheet’s row numbers | 0 |
showcolletters | Whether or not to output the spreadsheet’s column letters. If true (1), the column letters will be marked up as <th> elements. | 0 |
headers | If true (1) the first row in the resultset will be marked up as <th> elements. Not applicable if showcolletters is true. | 1 |
tableclass | The xHTML class name to apply to the table. | unset |
oddclass | The xHTML class name to apply to every odd <tr> element in the resultset. | unset |
evenclass | The xHTML class name to apply to every even <tr> element in the resultset. | unset |
cachedir | The name of the cache directory located in the files directory. This attribute only needs to be set if you choose a directory name other than ‘cache’. | cache |
About this plugin
This Textpattern plugin incorporates the excellent PHP Excel Reader class, originally written by Vadim Tkachenko and enhanced by Matt Kruse and Matt Roxburgh. Developed into a Textpattern plugin by Russell Brown.