# CODE

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function returns a numeric code to represent the first character in a text string. The returned code corresponds to the Windows character set (ANSI).

## Syntax

CODE(*text*)

## Arguments

The argument is the text from which you want to determine the code of the first character.

## Data Types

Accepts string data. Returns string data.

## Examples

`CODE(H6)`
`CODE(R6C8)`
`CODE("B")` gives the result 66
`CODE("Buffalo")` gives the result 66

## Version Available

This function is available in product version 1.0 or later.

## See Also

[CHAR](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsAtoC/FunctionCHAR) \| [Text Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functstext)