GcSpread.Sheets Namespace > CustomFormatterBase type : Format Method |
var instance = new GcSpread.Sheets.CustomFormatterBase(format, cultureName); var value; // Type: string value = instance.Format(obj, conditionalForeColor);
function Format( obj : Object, conditionalForeColor : Object ) : string;
var customFormatterTest = {}; customFormatterTest.prototype = GcSpread.Sheets.CustomFormatterBase; customFormatterTest.Format = function (obj, conditionalForeColor) { conditionalForeColor.value = "blue"; return "My format result : " + obj.toString(); }; customFormatterTest.Parse = function (str) { if (!str) { return ""; } return str; } activeSheet.getCell(1, 0).formatter(customFormatterTest); activeSheet.getCell(1, 0).value("Test");