Apache OpenOffice (AOO) Bugzilla – Issue 73246
DDE Link imports formatted number cell as text
Last modified: 2013-08-07 15:14:21 UTC
I'm importing data between spreadsheets and cells with numbers formatted as "Currency" - "-1234,00 €" (red if negative) are linked as text and not as number. One workaround for this issue is to format the origin cell as "Number" - "-1234,56". Even if the formatting data isn't retrieved, OO should know that the linked cell is, in fact, a number.
Steps to reproduce: 1. create a new spreadsheet called "file1.ods"; 2. write on A1 =-12345,67 and 3. write on A2 =12345,67; 4. write on A3 =SUM(A1:A2) - verify that the result is 0. 5. format cell A1 as Currency, € Portuguese (Portugal) and select "-1234,56" red when negative - verify that A1 is -12345,67 € (red); [leave A2 with default formatting] 6. create a new spreadsheet called "file2.ods"; 7. write on A1 =DDE("soffice";"_full_path_to_/file1.ods";"Sheet1.A1") 8. write on A2 =DDE("soffice";"_full_path_to_/file1.ods";"Sheet1.A2") 9. write on A3 =SUM(A1:A2) 10.1. A3 on file2.ods yields 12345,67 because the link on cell A1 wasn't correctly imported so counts as 0 for the sum formula on A3. 10.2. A1 on file2.ods yields "-12345,67 ?".
Hi Eike, this is Linux only (maybe Solaris too). Please have a look at it. Frank
Actually there may be 2 different causes that may lead to an interpretation of a string in this case: 1. As the 4th parameter isn't given, the system locale (respectively the locale chosen under Tools.Options.LanguageSettings.Languages) and its delimiters and currency synmbol don't match those of the number format, hence parsing the string doesn't result in a number. 2. More likely, as in #desc2 under 10.2 a question marks appears, the text encoding doesn't match between server and client, which is a duplicate of issue 9709. In this case parsing the string also doesn't result in a number. And no, Calc here does not know that the linked cell in fact is a number. The data retrieved from a DDE server is always a string. If you simply want to link to numbers of another document you may use external references instead, e.g. ='_full_path_to_/file1.ods'#Sheet1.A1 (note the single quotes around the document name), see also online-help "references;to cells in another document". *** This issue has been marked as a duplicate of 9709 ***
Closing.