TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

GetValue2

GetValue2() → { string | Array.<Array.<string>> }

Returns the Value2 property (value without format) of the specified range.

Parameters:

This method doesn't have any parameters.

Returns:

Type
string | Array.<Array.<string>>

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFormat = Api.Format("123456", ["$#,##0"]);
var oRange = oWorksheet.GetRange("A1");
oRange.SetValue(oFormat);
var sValue2 = oRange.GetValue2();
oWorksheet.GetRange("A3").SetValue("Value of the cell A1 without format: " + sValue2);
builder.SaveFile("xlsx", "GetValue2.xlsx");
builder.CloseFile();

Resulting document