Character.FromNumber
TextReturns the Unicode character corresponding to the given numeric code point.
Syntax
Character.FromNumber(number as number) as textParameters
| Name | Type | Required | Description |
|---|---|---|---|
number | number | Yes | A Unicode code point number (e.g., 65 for "A"). |
Return Value
text — A single-character text value corresponding to the Unicode code point.
Remarks
Character.FromNumber converts a Unicode code point (a non-negative integer) into the corresponding single-character text value. This is the inverse of Character.ToNumber. Any valid Unicode scalar value is accepted — the function is not limited to ASCII.
Common code point ranges include:
- 0–31: Control characters (tab = 9, line feed = 10, carriage return = 13)
- 32: Space
- 48–57: Digits 0–9
- 65–90: Uppercase letters A–Z
- 97–122: Lowercase letters a–z
The most practical use of this function is programmatic character generation: building separator strings, inserting control characters such as line feeds or tabs into text output, or generating sequences of characters with List.Transform. For example, List.Transform({65..90}, Character.FromNumber) produces the full uppercase alphabet as a list without hard-coding any characters.
When working with control characters in text, be aware that Text.Clean removes non-printable characters (code points 0–31), while Text.Trim only removes leading and trailing whitespace. If you insert control characters using Character.FromNumber and later need to remove them, use Text.Clean.
Examples
Example 1: Convert a code point to its character
Character.FromNumber(65)Result | |
|---|---|
| 1 | A |
Example 2: Generate a line feed character for text output
"Line 1" & Character.FromNumber(10) & "Line 2"Result | |
|---|---|
| 1 | Line 1 Line 2 |
Example 3: Build the full uppercase alphabet as a list
List.Transform({65..90}, Character.FromNumber)Result | |
|---|---|
| 1 | A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z |