Contact

ASC Function (OpenOffice Calc)

Text Intermediate OpenOffice Calc

Convert full-width Latin letters, digits, and katakana to half-width text in Apache OpenOffice Calc using ASC.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in OpenOffice Calc. How formula examples are checked

Quick answer

Use ASC(text) to convert full-width Latin letters, digits, and selected Japanese katakana characters to their half-width forms. It is useful when imported product codes or Japanese inventory data mix visually similar but different Unicode characters. The official Apache specification defines one required text argument and a text result; ASC is the complement of JIS. [S1, S2]

=ASC("ABC123")

Expected text result: ABC123. Those are ASCII letters and digits, not merely narrower fonts. [S1]

What ASC does — and what it does not

ASC operates on specified character mappings, not on font size or a cell’s column width. The Apache implementation specification maps full-width characters U+FF01–U+FF5E to corresponding ASCII characters U+0021–U+007E, and lists katakana and punctuation exceptions separately. Unsupported characters are copied unchanged. Some voiced Japanese kana produce two half-width code points. [S1]

This is not general-purpose Unicode normalization. For example, the full-width ideographic space U+3000 is not among the documented ASC mappings and should not be assumed to turn into an ASCII space. Ordinary English text is already narrow and remains unchanged. [S1]

Useful cases include comparing international SKU feeds, cleaning spreadsheet exports containing full-width digits, or preparing Japanese-language labels. Keep the original column so conversions can be audited; different inputs can become identical after conversion.

Exact documented syntax, arguments and scope

The historical Apache OpenOffice implementation specification gives: [S1]

ASC(Text T)

Use it in a Calc cell as:

=ASC(A2)
=ASC("ABC123")
  • Text T — required: the text string or a cell containing it. This is one argument; the specification provides no optional parameters or defaults. Quoted examples are text literals. [S1]
  • Return type: text. The function does not modify the original cell; put the formula in a separate column. [S1]
  • Character mapping: full-width Latin forms and the specific kana/punctuation covered by Apache’s tables. Unmapped characters remain in place. [S1]
  • Locale: examples use the English function name from Apache’s specification. With one argument there is no separator to type, but combined Calc formulas below use semicolons (;), matching Apache’s help syntax. Check the Function Wizard for localized names/settings. [S1, S6, S7]
  • Edition/platform: the source is an older implemented-feature specification and official category catalogue; its exact outputs are not native-tested in release 4.1.16 on Windows, macOS or Linux. [S1, S2, S8]

Do not confuse the Calc worksheet function ASC(text) with the Asc() routine in OpenOffice Basic. They are different operations: Basic’s Asc() reports a character’s numeric code. [S1]

Reproducible worksheet: full-width to half-width

Create a blank sheet. Enter the inputs below as text in cells A2:A9 (copy the characters exactly). Enter =ASC(A2) in B2 and fill down to B9. All results in the right column are expected from Apache’s character table, not measured in Calc. [S1]

Cell A: exact source text B: expected result of =ASC(A#) Why
A2 ABC123 ABC123 Full-width Latin letters and digits
A3 カタカナ カタカナ Japanese full-width katakana
A4 ガ ガ One voiced kana becomes two half-width characters
A5 パ パ Semi-voiced kana becomes base plus mark
A6 ABC 123 ABC 123 U+3000 ideographic space remains
A7 Alice Alice Already-narrow Latin letters remain
A8 ¥ \ U+FFE5 full-width yen sign maps to U+005C backslash
A9 こんにちは こんにちは Hiragana is outside the listed transformations

Visually important: In row A6, the gap between ABC and 123 in the result is a full-width space (U+3000), not an ordinary ASCII space (U+0020). The two can look similar. The \ in row A8 is a single backslash character, not a formula escape sequence. [S1]

Direct formula checks

=ASC("カタカナ")
=ASC("ガ")
=ASC("¥")
=ASC("")

Expected: カタカナ, ガ, one backslash \, and an empty text result, respectively. The last case follows from transforming an empty sequence; it has not been observed in the application. [S1]

Advanced examples

Clean a full-width space separately

ASC does not supply a general whitespace-normalization option. Apache documents SUBSTITUTE(originaltext; oldtext; newtext; which) with the fourth argument optional. When you explicitly want ASCII spaces, replace U+3000 before width conversion: [S1, S6]

=ASC(SUBSTITUTE("ABC 123";" ";" "))

Expected: ABC 123 with one ordinary space. The second quoted string in SUBSTITUTE is exactly U+3000; the third is exactly U+0020. If your data must preserve Japanese spacing, do not apply this step.

Compare codes after width conversion

Suppose A2 is ABC123 and C2 is ABC123. Apache documents EXACT(text1; text2) for case-sensitive string equality. This combination tests equality after the documented width conversion: [S1, S7]

=EXACT(ASC(A2);ASC(C2))

Expected: TRUE. That does not prove the two original values were byte-for-byte identical, and it must not be used to silently merge records without retaining the originals.

Character length can change

Apache’s LEN counts characters. Because full-width ガ becomes the two-character ガ, this formula has an expected result of 2: [S1, S5]

=LEN(ASC("ガ"))

This demonstrates character count, not bytes in UTF-8 and not screen width.

Troubleshooting and limits

Symptom Likely explanation / check
ASC seems to do nothing The input may already be half-width or consist of characters not listed in Apache’s mapping. Compare code points, not just appearance. [S1]
An ideographic space remains U+3000 is not in the documented width-conversion list. Use explicit SUBSTITUTE only when that is desirable. [S1, S6]
Length grows after converting kana A voiced kana can become a base half-width kana plus U+FF9E or U+FF9F mark. [S1, S5]
A yen sign becomes a backslash Apache explicitly maps U+FFE5 to U+005C, reflecting Japanese legacy character conventions. [S1]
An imported workbook behaves differently Excel describes ASC in a DBCS-language context; verify formula recognition, locale, and individual mappings in the destination program. [S3]
A formula shows an error Check the function spelling, quotation marks, input cell, and formula language. The exact runtime error for invalid argument types is not verified in this guide; do not assume an error code.

Common mistake: ASC is not the same as LOWER, UPPER, CLEAN or TRIM. Those address case, non-printing characters or whitespace; they do not implement this specific width map. Do not substitute one for the other. [S1, S2]

Compatibility and locale precautions

  • Apache OpenOffice Calc: ASC(Text T) is part of Apache’s documented implemented function family. The published 4.1.16 release was verified, but no platform-specific Calc run was performed for this guide. [S1, S2, S8]
  • Microsoft Excel: Microsoft documents ASC(text) for double-byte-character-set language contexts. Its availability and text conversion can depend on language settings; equivalent names do not prove all edge cases match OpenOffice. [S3]
  • LibreOffice Calc: a separately documented ASC function exists, but LibreOffice behaviour is not evidence for Apache OpenOffice. Test cross-application workbooks rather than assuming identical mappings. [S1]

Apache’s related text operations include JIS (the converse width mapping), LEN (character count), EXACT (case-sensitive comparison), and SUBSTITUTE (literal replacement). Therefore this guide does not insert unverified live-site links.

Official documentation (accessed 2026-10-11):

Validation note

The examples show expected results checked against Apache OpenOffice documentation and independent arithmetic, text mapping, or logical reasoning. They were not run in Apache OpenOffice Calc. Platform, locale, import, and unusual error cases are not certified.