Apache OpenOffice (AOO) Bugzilla – Issue 20680
Inserted fields from spreadsheet database don´t preserve number formatting
Last modified: 2017-05-20 11:19:48 UTC
When you insert a field, there is a Format box where you can choose "From Database" or "User Defined." If you choose "From Database" and you have formatted fields, the merged file will have unformatted fields. For example, if you have numbers like "3,100" and "280,000" formatted with "##0,#" in your spreadsheet and you import them into a mail merge, they come out looking like "3100" and "280000". This can be a real problem, especially when you want to do a merge with dollar values ($280000 looks pretty silly). To reproduce: 1) Create a test spreadsheet with 4 numbers, formatted as: general, comma separated, comma separated with decimals, and dollar with deciamals 2) Import the test spreadsheet 3) Create a document with the field 4) Do a mail merge to the printer 5) The fields will not be formatted Note: I was only able to do this by printing them, I wasn't able to create the files because that feature also doesn't work. Workarounds: The user can set the format to be something specific. In my case, I had to change all of the number fields to text fields and add the commas myself.
Please try using the latest OpenOffice 1.1 Final , you can download it from www.openoffice.org many bug fixes and enhancements since your version and 1.1 Final . If the problem still happend in 1.1 please report back
Sorry -- I put in the wrong version. This was tested on OOo1.1, the standard download from the site.
This problem can be reproduced also by using mail merge. I´ve modified the summary accordingly. The problem is visible already after having imported the spreadsheet database into Writer. The table there doesn´t make a difference between differently formatted numbers. Confirmed on OOo1.1.0, Win98. For reproduction I´ve created a small spreadsheet file. Will attach.
Created attachment 10442 [details] Database for reproducing the problem
HI->FS: After you defined the bugdoc as a new Data Source, open the Database with F4 and you will see the number formats are not imported 1:1.
this is a know limitation of the spreadsheet SDBC driver: it doesn't import the number formats. fs->nn: If the driver could provide the formatting as column property, then the higher layers (SDB) could probably use this. However, there's no infrastructure for this, yet. If we decide that this will be solved, then: - your driver needs to expose the spreadsheet format as column properties - our SDB layer needs to respect column formattings provided from the SDBC(X) layer
*** Issue 75459 has been marked as a duplicate of this issue. ***
*** Issue 102149 has been marked as a duplicate of this issue. ***
*** Issue 107279 has been marked as a duplicate of this issue. ***
Reset assigne to the default "issues@openoffice.apache.org".