Skip to main content

FINDB

Finds the specified substring within another string and is intended for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.

Syntax

expression.FINDB(arg1, arg2, arg3);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | stringThe text to find. Use double quotes (empty text) to match the first character in the search string. Wildcard characters are not allowed.
arg2RequiredApiRange | ApiName | stringThe text containing the text to find.
arg3OptionalApiRange | ApiName | numberSpecifies the character at which to start the search. The first character in the search string is character number 1. If omitted, this parameter is equal to 1.

Returns

number

Example

Find the position of a substring within text, counting bytes in a spreadsheet.

// How do I search for specific text using byte positions in a spreadsheet?

// Locate a text position using byte count instead of character count in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.FINDB("line", "Online Office"));