Displays a CSV file as a table
Parameters
- pageName - the page where the file is attached (optional. defaults to current page)
- fileName - the csv or tsv file to display
- separator - the column separator eg. , for csv or TAB for tsv(tab separated file)
Usage:
[{CSV pageName="/OpenForum/Extensions/CSV" fileName="my.csv" separator=","}]
renderer.sjs
fileName = extension.getAttributeValueByName("fileName");
newPageName = extension.getAttributeValueByName("pageName");
if(newPageName!=null)
{
pageName = newPageName;
}
separator = extension.getAttributeValueByName("separator");
if(separator==null)
{
separator=",";
}
data="";
return data;