ReplaceTextSmart
function ReplaceTextSmart(
arrString: [] = null,
sParaTab: string = " ",
sParaNewLine: string = " ",
): void
Description
Replaces each paragraph (or text in cell) in the select with the corresponding text from an array of strings.
Parameters
- arrString
[]
null An array of replacement strings.
- sParaTab
string
" " A character which is used to specify the tab in the source text.
- sParaNewLine
string
" " A character which is used to specify the line break character in the source text.
Returns
void
Try It
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"]);