Get Started
Usage API
More information

ReplaceTextSmart

ReplaceTextSmart(arrString)

Replaces each paragraph(or text in cell) in the select with the corresponding text from an array of strings.

Parameters:

Name Type Description
arrString Array

represents an array of strings.

Returns:

This method doesn't return any data.

Example

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

Resulting document