Bug 289496

Summary: Different values for OFFSET/IFERROR formulas displayed in the attached excel sheet.
Product: [Applications] calligrasheets Reporter: swathi <swathi.vegesna999>
Component: filter/xlsAssignee: Calligra Sheets (KSpread) Bugs <calligra-sheets-bugs-null>
Status: VERIFIED FIXED    
Severity: normal CC: abhishek.mittal, sebsauer
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Test data
Screenshot in MS Office
Screenshot in Calligra Tables
trimmed down test ods that show that the OFFSET formula seems to work as expected.
trimmed down test ods that show that the OFFSET formula seems to work as expected (2)
Verified screenshot in Rev:3bd850d44353717839b540b587af6704253c6d30

Description swathi 2011-12-21 12:58:19 UTC
Version: git checkout b2b29030922345d8e727ed03e80fb77537aece46
      (Using KDE 4.6.3)                
     OS: Kubuntu 11.04
Test data is in excel 2003 format.
Open the same document in Calligra Tables. 
Go to the 5th sheet “caluculations”.
Check the display of values in the sheet.

Expected outcome:
Values shoud be displayed properly.
Actual outcome:
#NAME error is displaying.		
Frequency:
Always
Comment 1 swathi 2011-12-21 13:00:05 UTC
Created attachment 66974 [details]
Test data
Comment 2 swathi 2011-12-21 13:00:27 UTC
Created attachment 66975 [details]
Screenshot in MS Office
Comment 3 swathi 2011-12-21 13:00:59 UTC
Created attachment 66976 [details]
Screenshot in Calligra Tables
Comment 4 Sebastian Sauer 2011-12-27 16:39:21 UTC
The reason is the used OFFSET function which is not implemented in Calligra Tables.
Comment 5 Sebastian Sauer 2012-01-10 11:05:11 UTC
Commit d643461c70648 implements the before missing IFERROR/IFNA formulas used in the attached Excel document. Commit 29c0a074b6a15 implements the missing OFFSET formula.

But there is a remaining issue that is that we display "0.0" rather then values like Excel does at the "Calculations" sheet in the attached excel document. The reason is probably that the OFFSET formula is incomplete in that it doesn't proper deal with !region.isSingular (means multi-dimensional ranges) and/or with the given width/height arguments. So, fixing that is still TODO. Changed the summary of the report to reflect what the remaining problem is.
Comment 6 Sebastian Sauer 2012-01-11 02:39:08 UTC
Created attachment 67684 [details]
trimmed down test ods that show that the OFFSET formula seems to work as expected.

Not sure yet where the bug is :-/
Comment 7 Sebastian Sauer 2012-01-11 02:42:40 UTC
Created attachment 67685 [details]
trimmed down test ods that show that the OFFSET formula seems to work as expected (2)
Comment 8 Sebastian Sauer 2012-01-11 05:32:14 UTC
Finally fixed with commit 4a419bd5455.
Comment 9 Abhishek Mittal 2012-02-03 12:01:22 UTC
Bug fixed in revision 3bd850d44353717839b540b587af6704253c6d30
Comment 10 Abhishek Mittal 2012-02-03 12:06:21 UTC
Created attachment 68458 [details]
Verified screenshot in Rev:3bd850d44353717839b540b587af6704253c6d30