Contact

BAHTTEXT Function (OpenOffice Calc)

Text Intermediate OpenOffice Calc

Write baht amounts as Thai text with Apache OpenOffice BAHTTEXT. Check satang rounding, negative amounts, million blocks and a directly verified Thai string.

Verification status: One BAHTTEXT(1234.56) English-name formula was directly entered and recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816. Eight table strings follow the inspected source. Their earlier generated-ODF imports failed name recognition and are excluded from successful execution evidence. How formula examples are checked

Quick answer: =BAHTTEXT(1234.56) returned หนึ่งพันสองร้อยสามสิบสี่บาทห้าสิบหกสตางค์ in a direct-entry check in Apache OpenOffice 4.1.16.

Availability and version history

  • Introduced: First release not established; documented in Apache OpenOffice 4.1.16 source.
  • Supported in: Apache OpenOffice 4.1.16; no final supported release is established.
  • Scope: English desktop Calc with semicolon-separated formulas. The observed locale was English (USA), default currency USD.
  • Checked: October 14, 2026. One ordinary English-name case was directly entered and recalculated in 4.1.16 on Linux x86-64, Build 9816. The eight table strings are source references; their failed generated-ODF imports are separate.

What BAHTTEXT returns

BAHTTEXT expresses a numeric amount in Thai baht and satang words. It returns text, not an exchange-rate conversion or a formatted numeric currency cell. The implementation uses fixed Thai strings, independently of the spreadsheet’s ordinary currency symbol. Release implementation.

Syntax and arguments

=BAHTTEXT(Number)
  • Number: amount to express in baht words.

Exactly one argument is required. The source takes the absolute value, rounds it to whole satang and then adds its Thai negative prefix when the original value was negative.

Eight source-reference examples

These eight strings are reconstructed from the release’s fixed Thai lexemes and block algorithm. Only the 1234.56 case was successfully executed through direct English entry; the other rows are source-based references.

Formula Source-derived Thai text
=BAHTTEXT(0) ศูนย์บาทถ้วน
=BAHTTEXT(1) หนึ่งบาทถ้วน
=BAHTTEXT(11) สิบเอ็ดบาทถ้วน
=BAHTTEXT(21) ยี่สิบเอ็ดบาทถ้วน
=BAHTTEXT(101) หนึ่งร้อยหนึ่งบาทถ้วน
=BAHTTEXT(1000000) หนึ่งล้านบาทถ้วน
=BAHTTEXT(1234.56) หนึ่งพันสองร้อยสามสิบสี่บาทห้าสิบหกสตางค์
=BAHTTEXT(-1.25) ลบหนึ่งบาทยี่สิบห้าสตางค์

Practical worksheet

The amount 1234.56 is decomposed into 1234 baht and 56 satang. The directly saved 1234.56 output can be compared character by character with its source-reference row; it is not a number on which to perform an interest or currency calculation. Keep the original amount in a separate numeric cell.

For a whole baht amount, the source uses its whole-amount ending instead of spelling zero satang. Zero itself has a dedicated zero-baht wording. A million boundary introduces the Thai million marker through a six-digit block algorithm, rather than by inserting western thousands separators.

Advanced interpretation and checks

The examples 11 and 21 exercise the special final-one and twenty forms in the inspected code. For 101, the source code’s final two-digit block has no tens digit, so it uses its ordinary one word. The guide reports the exact implementation spelling; it does not silently substitute a different linguistic convention.

Negative 1.25 has the same magnitude words as positive 1.25 with the negative prefix added. Values are rounded after multiplying the absolute amount by 100. A calculation used to choose the amount should therefore be completed numerically before calling BAHTTEXT, rather than trying to recover numbers from its words.

Boundaries and troubleshooting

All examples use ordinary finite amounts. The tests do not establish behavior at binary64 precision limits, very large repeated-million values, blank cells, invalid arguments or every half-satang rounding tie. The source’s decimal rounding step is not a general decimal-arithmetic guarantee for prior calculations.

This function does not translate a document or validate a legally required amount-in-words convention. If a form requires a particular wording, compare the actual output with that requirement. Preserve Thai characters exactly when exporting; a font or encoding change can affect appearance or text integrity without changing the original numeric amount.

Official evidence and checking scope

The directly entered English formula was saved with the source-mapped ODF identity COM.MICROSOFT.BAHTTEXT. Earlier generated ODF calls using bare BAHTTEXT all displayed #NAME?, despite refreshed controls. Those import errors are separate from the successful direct-entry result and do not establish lack of English-function support. Only one successful native BAHTTEXT case is claimed. The remaining strings follow the inspected source; the original XLSX was not executed.