Get Started
Usage API
More information

ReplaceTextSmart

ReplaceTextSmart(arrString, [sParaTab], [sParaNewLine])

Parameters:

Name Type Default Description
arrString Array

An array of replacement strings.

sParaTab string " "

specifies which character to use to define the tab in the source text.

sParaNewLine string " "

specifies which character to use to specify the line break character in the source text.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A1").SetValue("1");
oWorksheet.GetRange("A2").SetValue("2");
var oRange = oWorksheet.GetRange("A1:A2");
oRange.Select();
Api.ReplaceTextSmart(["Cell 1", "Cell 2"]);
builder.SaveFile("xlsx", "ReplaceTextSmart.xlsx");
builder.CloseFile();

Resulting document