SpreadJS Documentation
Parse Method
The text.
Parses the specified text. This function should be overwritten.
Syntax
var instance = new GcSpread.Sheets.CustomFormatterBase(format, cultureName);
var value; // Type: Object
value = instance.Parse(text);
function Parse( 
   text : string
) : Object;

Parameters

text
The text.

Return Value

The parsed object.
Example
This example creates a custom formatter.
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");
See Also

Reference

CustomFormatterBase type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.