BIN2HEX
Converts a binary number to hexadecimal.
Syntax
expression.BIN2HEX(arg1, arg2);
expression - A variable that represents a ApiWorksheetFunction class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| arg1 | Required | ApiRange | ApiName | number | The binary number which will be convertrd. | |
| arg2 | Optional | ApiRange | ApiName | number | The number of characters to use. |
Returns
number
Example
Transform binary notation into hexadecimal format in a spreadsheet.
// How do I change a binary code into hex notation for programming use in a spreadsheet?
// Translate base-2 values to base-16 notation for computer system operations in a spreadsheet.
let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.BIN2HEX(1110011100, 4));