VZ Tabular
Developer
3rd Party (Free)
265 downloads (last 90 days)
EE Version Support
- ExpressionEngine 2
- ExpressionEngine 3
- ExpressionEngine 4
- ExpressionEngine 5
Compatibility
If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.
- Updater
- Multi Site Manager
- Stand Alone Entry Form
- Low Variables
- Content Elements
- Better Workflow
- Matrix
- Grid
- Webservice
- Publisher
Requirements
- jQuery for the Control Panel
Add-On Type(s)
Plugin
Tags
VZ Tabular is an ExpressionEngine plugin that provides a simple method to output tabular data from the templates. Five output formats are currently supported: CSV, JSON, XML, HTML Table, & Excel. Some possible use-cases include: creating a simple read-only API, endpoints for AJAX operations, and exporting data for transfer to another system.
VZ Tabular is an ExpressionEngine plugin that provides a simple method to output tabular data from the templates. Five ouput formats are currently supported: CSV, JSON, XML, HTML Table, & Excel.
Some possible use-cases include: creating a simple read-only API, endpoints for AJAX operations, and exporting data for transfer to another system. Get creative!
Usage
The tag pair should be wrapped around a looping tag, such as channel:entries
or a Grid field. Within that loop, each column for output is wrapped in {col Heading} ... {/col}
, with “Heading” being the title for that column. Depending on the output format, you can usually include spaces in the column heading (XML does not support spaces).
If you have problems getting the output you want, turn on Template Debugging. VZ Tabular outputs detailed information about its process, and any problems that occur.
Column modifiers
decode
You may include an optional decode
parameter immediately after the column heaading. This will run html_entity_decode on the column value, converting, e.g. &
to &
. ExpressionEngine automatically converts special characters to HTML entities in the title field and any field set to “Auto XHTML” formatting. If your output target is not a webpage, you will probably prefer the actual character versus the encoded entity. (Note that the XML output format has an option to re-encode the characters, which will take precedence over this.)
Example:
{exp:vz_tabular:csv}
{exp:channel:entries channel="news" limit="10"}
[col Title decode]{title}[/col]
[col Publish Date]{entry_date format="%Y-%m-%d"}[/col]
[col Body]{body_text}[/col]
{/exp:channel:entries}
{/exp:vz_tabular:csv}
Output Formats
CSV
{exp:vz_tabular:csv} ... {/exp:vz_tabular:csv}
Sample Output
Title,"Publish Date",Body
"Article One",2015-03-17,"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut laoreet libero tincidunt, convallis est feugiat, pretium nibh.</p>"
"Article Two",2015-02-03,"<p>Fusce pretium neque magna, ac feugiat felis volutpat ut. Suspendisse id ullamcorper risus, a sodales nisi.</p>"
Parameters
filename
- Downloads the output to the user’s computer, rather than displaying it in the browser. Default: nonestop_processing
- If this is set toyes
, no further template processing will occur after the plugin runs. This is useful if you are creating a data-feed and want to ensure that no template debugging info is included on the page. Default:no
delimiter
- Default:,
.enclosure
- Default:”
.
JSON
{exp:vz_tabular:json pretty="yes"} ... {/exp:vz_tabular:json}
Sample Output
[
{
"Title": "Article One",
"Publish Date": "2015-03-17",
"Body": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut laoreet libero tincidunt, convallis est feugiat, pretium nibh.<\/p>"
},
{
"Title": "Article Two",
"Publish Date": "2015-02-03",
"Body": "<p>Fusce pretium neque magna, ac feugiat felis volutpat ut. Suspendisse id ullamcorper risus, a sodales nisi.<\/p>"
}
]
Parameters
filename
- Downloads the output to the user’s computer, rather than displaying it in the browser. Default: nonestop_processing
- If this is set toyes
, no further template processing will occur after the plugin runs. This is useful if you are creating a data-feed and want to ensure that no template debugging info is included on the page. Default:no
pretty
- Indent the JSON code for easier readability. Requires PHP 5.4+. Default:no
.
XML
{exp:vz_tabular:xml} ... {/exp:vz_tabular:xml}
Sample Output
<?xml version="1.0" encoding="UTF-8"?>
<root>
<element>
<Title><![CDATA[Article One]]></Title>
<Publish_Date><![CDATA[2015-03-17]]></Publish_Date>
<Body><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut laoreet libero tincidunt, convallis est feugiat, pretium nibh.</p>]]></Body>
</element>
<element>
<Title><![CDATA[Article Two]]></Title>
<Publish_Date><![CDATA[2015-02-03]]></Publish_Date>
<Body><![CDATA[<p>Fusce pretium neque magna, ac feugiat felis volutpat ut. Suspendisse id ullamcorper risus, a sodales nisi.</p>]]></Body>
</element>
</root>
Note: XML does not support spaces in tags, so they are automatically replaced with an underscore.
Parameters
filename
- Downloads the output to the user’s computer, rather than displaying it in the browser. Default: nonestop_processing
- If this is set toyes
, no further template processing will occur after the plugin runs. This is useful if you are creating a data-feed and want to ensure that no template debugging info is included on the page. Default:no
esc_html
- If this is set toyes
any HTML code in the data will be escaped (i.e.<p>Test</p>
would become<p>Test</p>
). Otherwise the HTML tags will be left alone and will be wrapped in a CDATA block. Default:no
root
- Name of the root element that contains the array of items. Default:root
element
- Name of the elements representing each row. Default:element
pretty
- Indent the XML code for easier readability. Default:no
Excel
{exp:vz_tabular:excel filename="spreadsheet.xlsx"} ... {/exp:vz_tabular:excel}
Parameters
filename
- (Required) Specify the name of the file that is created. The file should have an.xlsx
extension. Default: nonesheet
- Name of the worksheet. Default:Sheet1
Please note that the Excel output option requires PHP to be compiled with Zip support enabled.
HTML Table
{exp:vz_tabular:table} ... {/exp:vz_tabular:table}
Sample Output
<table>
<thead><tr>
<th>Title</th>
<th>Publish Date</th>
<th>Body</th>
</tr></thead>
<tbody
<tr>
<td>Article One</td>
<td>2015-03-17</td>
<td><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut laoreet libero tincidunt, convallis est feugiat, pretium nibh.</p></td>
</tr>
<tr>
<td>Article Two</td>
<td>2015-02-03</td>
<td><p>Fusce pretium neque magna, ac feugiat felis volutpat ut. Suspendisse id ullamcorper risus, a sodales nisi.</p></td>
</tr>
</tbody>
</table>
Parameters
esc_html
- If this is set toyes
, any HTML tags in the content will be escaped so the tags display on-screen. Otherwise they will be left alone to render normally. Default:no
tab
- String to use for indenting the HTML. Set to nothing (tab=”“
) for no indentation. Default: four spacesheaders
- Include a header row with the column names. Default:yes
id
- Sets an ID on the table element. Default: noneclass
- Sets a class on the table element. Default: none
Support
Please post any questions or problems in the Devot:ee support forum.
VZ Tabular uses a modular adapter system for output formats, so if there is another format that would be useful to you, please tell me!
Changelog
- 1.0.0: Initial public release.
- 1.0.1: Fix bug in Excel output format.
- 1.0.2: Allow global variables to be used in CSV output.
- 1.0.3: Enable alternate column syntax using square brackets for better performance and lower memory usage. Deprecate previous curly-bracket syntax.
- 1.1.0: Supports ExpressionEngine 3. Rearranged file structure in download.
- 1.3.0: Add “decode” column parameter to decode HTML entities.
- 1.3.1: Update PHP_XLSXWriter package.
Download VZ Tabular
EE Support | Downloads | Add-On Version | Release Date |
---|---|---|---|
2.6.0+ | Download | 1.3.1 | Jul 3, 2021 |
VZ Tabular Links
This entry was created May 13, 2015, 2:09 pm.
This entry was last updated July 3, 2021, 3:40 pm.
Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!
Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.
4 Reviews:
stefanos 08.20.17
Very easy to use to output data from the EE templates, and many format supported.
It’s very flexible, because creating a simple read-only API is easy, like exporting data.
Very powerful plugin !!
Blair Liikala 06.27.16
Easy, and works!
THEMOST 01.14.16
it the best idea to backup and move data from EE
timprint 08.04.15
I’ve only used the csv and excel options but they work really well. Very easy to set up. Solid add-on.