Issue 42727

Summary: Interoperatability with Thai MS Excel 97 : BAHTTEXT() and t number format prefix
Product: Internationalization Reporter: samphan
Component: codeAssignee: oc
Status: CLOSED FIXED QA Contact: issues@l10n <issues>
Severity: Trivial    
Priority: P2 CC: arthit, hin.stone, issues, jjc, markpeak, nusorn
Version: 680m79Keywords: oooqa
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: FEATURE Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 41707    
Attachments:
Description Flags
Excel 2003 file with BAHTTEXT() and t number format
none
Screenshot of the document loaded in Excel 2003
none
Screenshot of the document loaded in OOo 1.9.77 Calc
none
BAHTTEXT in MS Excel 2003 "Insert Function" dialog
none
BAHTTEXT in MS Excel 2003 Help none

Description samphan 2005-02-14 12:51:41 UTC
Thai version of MS Excel 97 has two custom extensions that will introduce
incompatability when converting the Excel document to OOo Calc, if not handled
appropriately.

1) The BAHTTEXT() function only available on Thai Excel 97. It is used to
spellout Thai currency, e.g. ฿210.50 becomes two hundred and ten bath fifty satang.

2) The 't' number format prefix. It is used in Thai Excel 97 to make a number
displayed using Thai digit, the same way OOo uses '[natnum1]'. For example, Thai
Excel 97 number format 't0' is the same as OOo '[natnum1]0' and will make 210
displayed as ๒๑๐.

The OOo Excel filter should be able to support the use of these extensions to
import/export the documents (that use the features) correctly. The 't' number
prefix should be easy to convert (to [natnum1]). But the BAHTTEXT() function
requires the same function or alike to be implemented in OOo.
Comment 1 arthit 2005-02-14 12:59:51 UTC
There's a hack to achieve these functionalities,
available in the OOo-derived "Pladao Office" http://www.pladao.org/

fyi, Pladao Office 3.1 (current version, based on OOo 1.1.x) source tarball is here 
http://www.pladao.org/files/3.1/PladaoOffice3.1-src.tar.gz
although I have no clue where are the changes that makes it supports BAHTTEXT()
and 't' number format.

nusorn@ may able to help us.
Comment 2 jjc 2005-02-15 15:57:05 UTC
Samphan, Can you provide a testcase for this?
Comment 3 samphan 2005-02-16 10:17:23 UTC
I've just found that the BATHTEXT() function and t prefix also available and
working in Excel 2003.

Test case:-
- The attached document is an Excel 2003 document with two cell :
one is '=BATHTEXT(12.5)', the other is '123' formated using
number format 't0'. The result of the first cell is the spellout
of 12.50 Baht. The result of the second cell is the number 123
displayed using Thai digit. See the attach screenshot from Excel.

- Load the attached document in Calc. The Thai feature from Excel
will not work. See the second screenshot. The BATHTEXT() will
convert to _xlfn.BAHTTEXT(). And the 't0' number format convert
to '0', result in the number to be displayed using ASCII.
Comment 4 samphan 2005-02-16 10:19:30 UTC
Created attachment 22691 [details]
Excel 2003 file with BAHTTEXT() and t number format
Comment 5 samphan 2005-02-16 10:20:44 UTC
Created attachment 22692 [details]
Screenshot of the document loaded in Excel 2003
Comment 6 samphan 2005-02-16 10:21:53 UTC
Created attachment 22693 [details]
Screenshot of the document loaded in OOo 1.9.77 Calc
Comment 7 arthit 2005-02-18 22:36:52 UTC
Test with OOo 1.9.79 (Windows). Confirmed.
Comment 8 arthit 2005-04-25 08:06:26 UTC
Created attachment 25428 [details]
BAHTTEXT in MS Excel 2003 "Insert Function" dialog
Comment 9 arthit 2005-04-25 08:07:21 UTC
Created attachment 25429 [details]
BAHTTEXT in MS Excel 2003 Help
Comment 10 arthit 2005-04-25 08:13:43 UTC
Change Priority to P2,
Issue type to DEFECT.

As it's now clear that this loss of BAHTTEXT() is a loss of MS
Office-compatibility, import/export, which can be considered as:
- Data loss
- Basic functionality is not working correctly
Comment 11 falko.tesch 2005-05-09 13:47:18 UTC
FT: Yes, you are right. Nevertheless BAHTTEXT is hardy ever used outside
Thailand (in fact  does not ship with German or standard English version of Excel).
Therefore no fix in 2.0.x
Comment 12 Martin Hollmichel 2005-05-11 16:07:40 UTC
set target to 2.0.1
Comment 13 Martin Hollmichel 2005-08-24 12:56:50 UTC
reassign
Comment 14 daniel.rentz 2005-08-26 15:07:46 UTC
BAHTTEXT function implemented. See issue 53826 for the "t" prefix.

Fixed in SRC680/dr41 (OOo 2.0.1)
Comment 15 daniel.rentz 2005-10-07 14:00:43 UTC
back to QA

re-open issue and reassign to oc@openoffice.org
Comment 16 daniel.rentz 2005-10-07 14:01:00 UTC
reassign to oc@openoffice.org
Comment 17 daniel.rentz 2005-10-07 14:01:17 UTC
reset resolution to FIXED
Comment 18 frank 2005-10-19 13:55:57 UTC
found fixed on cws dr41 on Linux, Solaris and Windows build
Comment 19 oc 2005-10-31 14:19:11 UTC
closed because fix available in OOo2.0m136