Issue 73246 - DDE Link imports formatted number cell as text
Summary: DDE Link imports formatted number cell as text
Status: CLOSED DUPLICATE of issue 9709
Alias: None
Product: Calc
Classification: Application
Component: formatting (show other issues)
Version: OOo 2.1
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: ooo
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-08 12:53 UTC by pjvenda
Modified: 2013-08-07 15:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description pjvenda 2007-01-08 12:53:07 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.
Comment 1 pjvenda 2007-01-08 13:04:00 UTC
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 ?".
Comment 2 frank 2007-03-08 15:18:26 UTC
Hi Eike,

this is Linux only (maybe Solaris too).

Please have a look at it.

Frank
Comment 3 ooo 2007-03-08 16:43:01 UTC
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 ***
Comment 4 ooo 2007-03-08 16:44:46 UTC
Closing.