The CellFormatter (as described in http://mondrian.pentaho.com/document...Cell_formatter) does not work properly. I've implemented a custom Formatter and added in the project. The 'formatCell(Object value)' method is being called normally, as can be seen through standard output logs we placed on it. The results though are not formatted as expected and is displayed as a regular number.


My CellFormatter is not throwing any exception. The javascript version of such formatter was also tested and produced no changes in results. The same behavior was observed on schemes built for Mondrian 3.15 and 4.4 with metamodel versions 3 and 4, respectively. Once again, the results are the same.

Here's how I configured the schema on metamodel version 3 :

Code:
<Measure name="Test" column="test" aggregator="sum" >
<CellFormatter className="com.test.CustomFormatter"/>
</Measure>
and here's the formatter sourtce code :
Code:
package com.test;


import mondrian.spi.CellFormatter;
import org.apache.commons.lang.time.DurationFormatUtils;


public class CustomFormatter implements CellFormatter{


    public String formatCell(Object value) {
        if (value == null)
            return "NA";
        else{
            Double temp = Double.parseDouble(value.toString());
            String output = DurationFormatUtils.formatDuration(temp.longValue() * 1000, "HH:mm:ss", true);
            System.out.println(output);
            return output;
        }
    }
    
}
I am testing on Excel connected on mondrian through mondrian.xmla.impl.MondrianXmlaServlet

What am I missing here? Any help would be greatly appreciated!