FYI ---------- Forwarded message ---------- From: Samphan Raruenrom <samp...@osdev.co.th> Date: 2011/3/7 Subject: Approaches to enable international number format import/export in Calc To: libreoff...@lists.freedesktop.org Cc: kyosh...@novell.com, Tantai Thanakanok <tan...@osdev.co.th>
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<https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B__gfZ8MHOEoMDg2YjQ2ZmQtNTlkZi00NDZkLTk4ZGMtNWU4ZmQyMTdjMWUy&hl=en>file) When import to Calc will become The reason is that Excel international number format (LCID) is completely different from Calc's. See https://office.microsoft.com/en-us/excel-help/creating-international-number-formats-HA001034635.aspx The correct import would generate the following in Calc (see manually-fixed i18ndate.ods<https://docs.google.com/leaf?id=0B__gfZ8MHOEoYTc5NzY1NjEtZDUyNS00NjBlLWEzODMtOWU4MmNjNzZhYjY5&hl=en> ) (note: still see difference in how Excel and Calc interpret Hijri calendar) See LibO bug https://bugs.freedesktop.org/show_bug.cgi?id=33089 and the original OOo issue http://openoffice.org/bugzilla/show_bug.cgi?id=93503 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<http://www.facebook.com/osdev> -- _/|\_ Samphan Raruenrom. Open Source Development Co., Ltd. Tel: +66 38 311816, Fax: +66 38 773128, http://www.osdev.co.th/ -- Unsubscribe instructions: E-mail to l10n+h...@libreoffice.org List archive: http://listarchives.libreoffice.org/www/l10n/ *** All posts to this list are publicly archived for eternity ***