Skip to Content
0
May 15, 2015 at 12:46 PM

Formatter parameter is null

278 Views

Hi,

I am trying to export table data to an Excel sheet. Everything works OK without formatter. But I have to format some cells before converting table to Excel. I'm debugging the code. Formatter function's parameter passes as null value. Here is my code:

var oExport = new sap.ui.core.util.Export(
{ exportType : new sap.ui.core.util.ExportTypeCSV(
{
separatorChar : ";"
}), models : this.getView().getModel(), rows : {
path : "/FaaliyetServisiSet"
}, columns : [
{
name : "Kişi",
template : {
content : "{Klnad}"
}
}, {
name : "Faaliyet",
template : {
content : "{Falyt}"
}
}, {
name : "Süre",
template : {
content : {
parts : ["Sure"],
formatter : function(oValue){ // oValue is null that's the problem !!!!!!!
oValue = oValue + 2;
return oValue;
}
}

}
}, {
name : "Proje",
template : {
content : "{Proje}"
}
}, ]
});