Issue 8640

Summary: Save as .xls writes incorrect cell format
Product: Calc Reporter: philhibbs <snarks>
Component: codeAssignee: oc
Status: CLOSED FIXED QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P2 CC: issues
Version: OOo 1.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 98   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Demo spreadsheet for Save As Excel cell format problem
none
proposed patch none

Description philhibbs 2002-10-23 12:00:15 UTC
A cell that contains a formula such as =IF(C8="";"";IF(C8=$D$5;0;C8)), with 
Category=Number, Format=General, is written out as an .xls with 
Category=General if the source cell C8 contains a value, but Category=Text if 
C8 does not contain a value. This leads to any further calculations that 
reference the cell being incorrect, as Text cells are not considered to be 
numbers.

I had previously been adding comments to Issue 5658, but I now believe that 
this is a separate issue with the Save As Excel 97 code. See the prh_demo.sxc 
attachment. If you save this as Excel, cell D7 remains as numeric, but D8 
changes to Text. If you then overtype B8 and D8, then E8 miscalculates 
(overtype B7 and D7 with the same values to see the correct result in E7).
Comment 1 philhibbs 2002-10-23 12:01:39 UTC
Created attachment 3306 [details]
Demo spreadsheet for Save As Excel cell format problem
Comment 2 daniel.rentz 2002-11-06 09:32:32 UTC
Very easy to reproduce:
In a new spreadsheet, type ="", and save to Excel.
Comment 3 daniel.rentz 2002-11-06 09:32:52 UTC
started
Comment 4 daniel.rentz 2003-01-13 17:01:47 UTC
target->OOo1.1beta
Comment 5 john.marmion 2003-01-17 14:42:32 UTC
Accepting ownership of thois issue. Thanks to Daniel the proposed fix
turned out to be relatively simple.
Comment 6 john.marmion 2003-01-17 14:44:05 UTC
Created attachment 4327 [details]
proposed patch
Comment 7 john.marmion 2003-01-17 15:04:57 UTC
Checked in this fix today
Comment 8 john.marmion 2003-02-19 12:31:08 UTC
re-open to assign to QA
Comment 9 john.marmion 2003-02-19 12:31:47 UTC
re-assigning to QA
Comment 10 john.marmion 2003-02-19 12:32:47 UTC
re-setting to "fixed"
Comment 11 frank 2003-04-08 10:50:52 UTC
verified on cws calc06 using Windows and Solaris
Comment 12 frank 2003-04-16 15:03:28 UTC
found integrated on Solaris, Linux and Windows using srx644m10s1
Comment 13 daniel.rentz 2003-04-28 09:18:40 UTC
*** Issue 13814 has been marked as a duplicate of this issue. ***