Maintainer:
nemeth
Rating:
4.42857
Average: 4.4 (21 votes)
Application:
Calc
Tags:
spreadsheet, , conversion, , number, , function, , numeral, , number, to, text,
Source code:
http://www.launchpad.net
Post date:
Friday, 22 May, 2009 - 08:59
Statistics
Week: 155 - Month: 617 - Year: 8,166 - Timeline
Download extension
System Independent version - All releases
Compatible with OpenOffice 4: Unknown
User feedback:
Compatible with OpenOffice 4.x?

NUMBERTEXT and MONEYTEXT are spreadsheet functions for number to number name and currency name conversion proposed for OpenFormula standard. MONEYTEXT is functionally top-compliant with the ECMA/ISO standard BAHTTEXT function, and supports more than 30 languages: Africaans, Belgian French, Brazilian Portuguese, Catalan, Chinese, Czech, Danish, Dutch, English, Esperanto, Finnish, French, German, Greek, Hebrew, Hungarian, Indonesian, Italian, Japanese, Korean, Luxembourgish, Polish, Portuguese, Romanian, Russian, Serbian (Latin and Cyrillic), Slovenian, Spanish, Swedish, Swiss French, Thai, Turkish and Vietnamese. For Java jar and JavaScript libraries, see http://NUMBERTEXT.org. For OpenOffice.org Writer usage, see Linux Libertine G with Numbertext support and OpenOffice.org Typography toolbar.

= Installation and usage =
Tools->Extension Manager->Add
After restarting OpenOffice.org, there are two new Calc functions, NUMBERTEXT() and MONEYTEXT(), i.e.:
=NUMBERTEXT(25)
=NUMBERTEXT(25;"th-TH")
=MONEYTEXT(25)
=MONEYTEXT(25;"USD")
=MONEYTEXT(25;"CNY";"zh-ZH")

Numbertext

Version Operating system Compatibility Release date
0.9.4 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 03/11/2010 - 09:20 More information Download
0.9.3 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 03/08/2010 - 13:52 More information Download
0.9.2 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 07/06/2010 - 09:25 More information Download
0.9.1 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 28/05/2010 - 06:05 More information Download
0.9 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 20/05/2010 - 11:03 More information Download
0.8.2 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 26/04/2010 - 09:34 More information Download
0.8.1 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 22/04/2010 - 09:22 More information Download
0.8 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 19/04/2010 - 09:14 More information Download
0.7.1 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 13/11/2009 - 15:39 More information Download
0.7 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 09/11/2009 - 19:00 More information Download
0.6.1 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 04/09/2009 - 11:37 More information Download
0.5 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 20/08/2009 - 12:00 More information Download
0.4 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 09/08/2009 - 20:04 More information Download
0.2 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 24/07/2009 - 21:31 More information Download
0.1.2 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 22/05/2009 - 10:31 More information Download

Comments

Can you, please, add the Lithuanian language to this excellent extension?

Here's a macro for the currency names (MONEYTEXT), I hope you can extrapolate the NUMBERTEXT from it (drop me an email at astepukonis@apache.org for any additional help needed in making this happen):

'=======MAKROKOMANDOS TEKSTAS========

Function SumLT(NumberArg As Double, intCase As Integer) As String

'*----------------------------
' Funkcijos reikšmė – suma žodžiais.
'*----------------------------

Dim strSuma As String
Dim strMillions As String
Dim strThousands As String
Dim strHundreds As String
Dim m1 As String
Dim m2 As String
Dim t1 As String
Dim t2 As String
Dim r1 As String
Dim r2 As String
Dim v As String
Dim d As String
Dim strRez As String

strSuma = Format(NumberArg, "000,000,000.00" )
strMillions = Mid(strSuma, 1, 3)
strThousands = Mid(strSuma, 5, 3)
strHundreds = Mid(strSuma, 9, 3)
If NumberArg strRez = "nulis litų"
GoTo pabaiga
End If

If strMillions "000" Then
m1 = TrysSkaitmenys(strMillions)
d = Mid(strMillions, 2, 1)
v = Right(strMillions, 1)
Select Case d
Case "1"
m2 = "milijonų "
Case Else
Select Case v
Case "0"
m2 = "milijonų "
Case "1"
m2 = "milijonas "
Case Else
m2 = "milijonai "
End Select
End Select
End If
If strThousands "000" Then
t1 = TrysSkaitmenys(strThousands)
d = Mid(strThousands, 2, 1)
v = Right(strThousands, 1)
Select Case d
Case "1"
t2 = "tūkstančių "
Case Else
Select Case v
Case "0"
t2 = "tūkstančių "
Case "1"
t2 = "tūkstantis "
Case Else
t2 = "tūkstančiai "
End Select

End Select
End If

r1 = TrysSkaitmenys(strHundreds)
d = Mid(strHundreds, 2, 1)
v = Right(strHundreds, 1)
Select Case d
Case "1"
r2 = "litų"
Case Else
Select Case v
Case "0"
r2 = "litų"
Case "1"
r2 = "litas"
Case Else
r2 = "litai"
End Select
End Select

strRez = m1 + m2 + t1 + t2 + r1 + r2 + " "

pabaiga:

SumLT = UCase(Left(strRez, 1)) + LCase(Mid(strRez, 2)) + Right(strSuma, 2) + " ct"

End Function

Private Function TrysSkaitmenys(strNum3 As String) As String

Dim s1 As String * 1 'šimtai
Dim d1 As String * 1 'dešimtys
Dim d2 As String * 2 'dešimtys ir vienetai
Dim v1 As String * 1 'vienetai
Dim s3 As String
Dim d3 As String
Dim v3 As String

s1 = Left(strNum3, 1)
d1 = Mid(strNum3, 2, 1)
d2 = Mid(strNum3, 2, 2)
v1 = Right(strNum3, 1)

Select Case s1
Case "1"
s3 = "vienas šimtas "
Case "2"
s3 = "du šimtai "
Case "3"
s3 = "trys šimtai "
Case "4"
s3 = "keturi šimtai "
Case "5"
s3 = "penki šimtai "
Case "6"
s3 = "šeši šimtai "
Case "7"
s3 = "septyni šimtai "
Case "8"
s3 = "aštuoni šimtai "
Case "9"
s3 = "devyni šimtai "
End Select
Select Case d1

Case "1"
Select Case d2
Case "10"
d3 = "dešimt "
Case "11"
d3 = "vienuolika "
Case "12"
d3 = "dvylika "
Case "13"
d3 = "trylika "
Case "14"
d3 = "keturiolika "
Case "15"
d3 = "penkiolika "
Case "16"
d3 = "šešiolika "
Case "17"
d3 = "septyniolika "
Case "18"
d3 = "aštuoniolika "
Case "19"
d3 = "devyniolika "
End Select
Case "2"
d3 = "dvidešimt "
Case "3"
d3 = "trisdešimt "
Case "4"
d3 = "keturiasdešimt "
Case "5"
d3 = "penkiasdešimt "
Case "6"
d3 = "šešiasdešimt "
Case "7"
d3 = "septyniasdešimt "
Case "8"
d3 = "aštuoniasdešimt "
Case "9"
d3 = "devyniasdešimt "
End Select
If d1 "1" Then
Select Case v1
Case "1"
v3 = "vienas "
Case "2"
v3 = "du "
Case "3"
v3 = "trys "
Case "4"
v3 = "keturi "
Case "5"
v3 = "penki "
Case "6"
v3 = "šeši "
Case "7"
v3 = "septyni "
Case "8"
v3 = "aštuoni "
Case "9"
v3 = "devyni "
End Select
End If
TrysSkaitmenys = s3 + d3 + v3
End Function

Great addon, here's a few corrections in Portuguese from Portugal

In Portuguese from Portugal the word "cents" is "cêntimos.
eg. 0,40 its "quarenta cêntimos" not "quarenta cents"

and also in the hundreds house it isn't "cientos" its "centos":

[100] - "cem"
[101;199] - "cento"
[200;299] - "duzentos"
[300; 399] - "trezentos
[400; 499] - "quatrocentos"
[500; 599] - "quinhentos"
[600;699] - "seiscentos"
[700; 799] - "setecentos"
[800; 899] - "oitocentos"
[900; 999] - "novecentos"

thanks for your atention.

Good day

I get OpenOffice Calc "Conversion error" (OpenOffice 3.4.1 installed) on Russian (default language) conversions (extension v. 0.8.1).

In case of NUMBERTEX or MONEYTEXT functions applied to numbers:
- from 2'000 to 4'999 or
- from 22'000 to 24'999 or
- from 122'000 to 144'999 and so on.

Corrections for Russian conversions:
1) NUMBERTEXT(1000) = "тысяча", correct version: "одна тысяча"
2) NUMBERTEXT(21000) = "двадцать один тысяч", correct version: "двадцать одна тысяча"
3) NUMBERTEXT(31000) = "тридцать один тысяч", correct version: "тридцать одна тысяча" and so on

Thanks for attention

This and more corrections for Russian conversions on https://bugs.launchpad.net/numbertext/+bug/1098487

Hello,
How can I add a new language. I need this awesome function in Lithuanian language. Can someone tell me how to do that or I can provide necessary translations to someone.
Thanks a bunch.
v.

There is no *ciento* nor *cientos* in pt-br numbers. So, numbers having 101 to 199, 400 to 499 and 600 to 999 in any group are spelled wrong. Please, change it to *cento* and *centos* ( file numbertext_pt_BR.py ? ).

Thank you for this great extension.

I'll try posting again, the first try was deleted as spam. The Portuguese spelling of 100 in the numbers 101 to 199 is "cento", not "ciento".

In russian subunits of USD, GBP & EUR are «male», so digit «2» (that has male/female distinction) must be also «male»: “два цента” not “две цента” (USD, EUR), “два пенса” not “две пенса” (GBP).
Could you fix it?

Also would you be so kind to add in ru_RU -- Ukrainian currency (that is very needful for Russian-speaking Ukrainians) . Just one line:
UAH:(\D+) $(\1: гривна, гривны, гривен, копейка, копейки, копеек)

Thanks in advance!

I was really excited to see this extension. I have a desperate need for it. But I need it in a Base Report. I confirmed that it's available in calc, but it does not appear in the Sun Report Builder.

Any ideas on how I could access it from the report?

Excellent little tool.
Would it be possible to add in traditional chinese numbers used for writing cheques as follows:
零 壹 貳 叁 肆 伍 陸 柒 捌 玖 拾 佰 仟 萬
0 1 2 3 4 5 6 7 8 9 10 100 1000 10000

It would be a very useful option to have.
many thanks
Muddler

OpenOffice.org supports native number formats of Chinese, Japanese, Korean etc. languages by special formatting codes. Set the cell language to traditional Chinese, and use the following custom number formatting code:

[NatNum5]#

The cell with 1230 will show "壹仟貳佰參拾".

Eg. MONEYTEXT(1230;"CNY";"zh-ZH-2") returns with "壹仟贰佰叁拾". The result is in simplified Chinese characters, so I will add the zh-TW module for the traditional ones in the next release. Thanks for your comment, László

Hey.

I can't install this plugin on my computer which is running Pardus 2009.2 with all the latest software.

I get the following error message:

loading component library failed: file:///opt/OpenOffice.org/lib/000-3.2/program/../basis-link/program/pythonloader.uno.so

OpenOffice.org contains Python and PyUNO, the requierements of the Numbertext extension, but some Linux distributions remove them to separated packages. On Pardus Linux you have to install the openoffice-python package.

Works great! Thanks a lot!
But there is a small error converting number "3783,48" to russian.
In Calc (3.2) it gives "Conversion error".
On site it responds "три тысячи рубля сорок восемь копеек"
but should "три тысячи семьсот восемьдесят три рубля сорок восемь копеек".
Maybe you check what is the problem?
Thank you again for your great job!

I had made a bad back reference in one the rules of the Russian module. Fixed in the newest release. Many thanks for your report.

Hello,
This is is very usefull function but it converts number 100000 to one hundred thousand, instead of that is it possible to convert it to one lakh or 200000 as two lakh or 1,25,000 as one lakh twenty five thousand & so on?
Regards,
Dhanil

Hello Dhanil, I have added the en-IN module to the Numbertext 0.9.1. A question: what about the ordinal numbers? Now are lakhth and croreth. Regards, László

Hello!
Thank you for this cool and very useful extention!
Found some bugs:
Moneytext:
- in many financial documents i must write number of thousands when thousands=1:
1000=одна тысяча, like in english module
- It is not necessary to write lead "ноль рублей" when roubles=0
0,01=одна копейка, for example
- 90=девяносто (not "девятьдесят"), also in Numbertext
- and what rogerclc (02/26/2010 - 08:54) told about, but not only (1, 21, 31, 41). Also for 51, 61, 71, 91
51,51=пятьдесят один рубль пятьдесят одна копейка
61,61=шестьдесят один рубль шестьдесят одна копейка
71,71=семьдесят один рубль семьдесят одна копейка
81,81=восемьдесят один рубль восемьдесят одна копейка
91,91=девяносто один рубль девяносто одна копейка
Numbertext correct is:
- 1,001=одна целая и одна тысячная and so on x,xx1
- 1,01=одна целая и одна сотая and so on [x,21...x,91] step 0,1
- 1,1=одна целая и одна десятая
- x,11= "x" и одиннадцать сотых
- x,011= "x" и одиннадцать тысячных and so on [x,011...x,911] step 0,1
- [0,2...0,9]=["ноль целых две"... "ноль целых девять"] десятых
- may be it's better to limit fractional part to 3 digits after comma before conversion to text. (guess theese values never be used)
I understand that is very difficult task to write in many languages, so i have to thank you again for working on it!

the polish version contains an error in writting 20, 30 and 40 after the coma, it should read "jeden zloty dwadziescia groszy" and instead, it reads "jeden coma dwa zlote". The same error exist in 1,30 / 1,40 and so on...

Thanks for your bug report.

Hello,
first of all: Thanks for this great extension.

In OOo 3.2 (DE; Win XP and Win 7) obviously the language of the document is not recognized by both numbertext and moneytext, so you always have to insert the parameters for language and currency. Do you plan to release an update for OOo 3.2? Would be really great!

Hello, Numbertext 0.8 restores the original function for the Western languages. Many thanks, László

Dear Developer(s),

A superb program that I could never write myself - thank you!

If I could be so bold - some grammatical corrections for the Russian "Moneytext" for your consideration:

- for numbers ending in 1 that are not 'teens' (1, 21, 31, 41, 101, 121, etc.): roubles = рубль; kopeks = копейка
- for all numbers ending in 1 in the kopeks column (.01, .21, etc): one = одна

eg:

21.00 = двадцать один рубль
21.01 = двадцать один рубль одна копейка
21.21 = двадцать один рубль двадцать одна копейка

Dear Developer(s),

After testing MONEYTEXT I find the bug in 1 eurocent it's write 10. Follow that link http://img264.yfrog.com/i/appunti02.jpg/

Regards,
Nicolas Pagni

The swedish for 7 is "sju" not "sjo".

Thanks for your report. László

First, many thanks for this splendid and useful extension we have been waiting for years!

From a programming point of view the algorithm is extremely elegant and versatile, compared to other implementations I have seen. Maybe some day I will understand it...

Ho cercato di installare "numbertext" un'estensione di openoffice calc ma
appena immetto come formula "numbertext" attraverso "funzioni" in calc e
faccio riferimento come valore ad una cella che contiene un numero come
risultato mi da "#valore". Se qualcuno può aiutarmi, gli sarei molto grato.
P.S. usare un linguaggio abbastanza semplice perchè non sono un tecnico e ne
capisco poco.
Potete inviare risposta a: avvnicolovignanello@libero.it
Grazie in anticipo.
Cordiali saluti

Could you send some data about the versions and distributions of your OpenOffice.org and operating system?

Regards,
László

Dear Developer(s),

After testing this extension with XLS and ODS files in Calc, it was found that #MACRO? error occurs in excel file while ods file does support it. It is suggested to enable the same features for excel file also while accessing it through calc.

Regards,
Mushtaque Asghar

Dear Mushtaque Asghar,

Thanks for the hint of Eike Rathke in OOo Issue 103746 (http://lingucomponent.openoffice.org/issues/show_bug.cgi?id=103746) and the excellent Calc Add-in example of Jan Holst Jensen (http://biochemfusion.com/doc/Calc_addin_howto.html), the new module (0.3) works well with XLS format, too.

Regards,
László