[Libreoffice] Approaches to enable international number format import/export in Calc

Samphan Raruenrom samphan at osdev.co.th
Sun Mar 6 22:57:03 PST 2011

Surprisingly, Calc doesn't support or even handle import/export from/to 
Excel international number format, result in lost of information from 
dates in non-western locale when convert.

For example, these dates in Excel (see i18ndate.xls 

When import to Calc will become

The reason is that Excel international number format (LCID) is 
completely different from Calc's.

The correct import would generate the following in Calc (see 
manually-fixed i18ndate.ods 

(note: still see difference in how Excel and Calc interpret Hijri calendar)

See LibO bug
and the original OOo issue

In bugzilla, I and Kohei have made a discussion about the approaches to 
fix this problem :-
1) When import from Excel, convert Excel LCID (4-8 hex digits) to Calc's 
natnum and calendar specifier. When export reverse the process to 
generate the appropriate Excel LCID.
2) When import form Excel, maintain Excel LCID as-is in Calc number 
format. When export use the LCID already there.

Since this is a feature that effect many non-western locales. Each with 
specific details in how they handle local calendars and natnums. I think 
we should make this important decision first, before we start to 
implement it. This will benefit every non-western locales with natnums 
and/or local calendars. I know because this is the top-priority bug in 
Thai, to convert date in buddhist calendar from Excel. Other non-western 
locales must have faced similar problems.

So what do you think?

_/|\_ Samphan Raruenrom.  Osdev - Open Source Development Co., Ltd.
สัมพันธ์ ระรื่นรมย์.  โอเอสเด็บ - บริษัท โอเพนซอร์สดิเวลอปเมนต์ จำกัด
tel: +66 2 269 9889  web: osdev.co.th <http://www.osdev.co.th/>
twitter: @osdev <http://twitter.com/osdev>  facebook: facebook.com/osdev 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110307/21aeba32/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moz-screenshot-4.png
Type: image/png
Size: 8848 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110307/21aeba32/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moz-screenshot-5.png
Type: image/png
Size: 8271 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110307/21aeba32/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moz-screenshot-6.png
Type: image/png
Size: 8602 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110307/21aeba32/attachment-0005.png>

More information about the LibreOffice mailing list