Issue 89550 - Err:504. =INDEX(Range,pos) to import as =INDEX(Range;1;pos)
Summary: Err:504. =INDEX(Range,pos) to import as =INDEX(Range;1;pos)
Status: CLOSED DUPLICATE of issue 78781
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: OOo 3.0 Beta
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: ooo
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-16 10:52 UTC by jpginn
Modified: 2008-05-28 14:05 UTC (History)
1 user (show)

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


Attachments
Calc file showing import error for INDEX (9.19 KB, application/vnd.oasis.opendocument.spreadsheet)
2008-05-16 10:53 UTC, jpginn
no flags Details
Excel file that does not import INDEX correctly to Calc (13.50 KB, application/vnd.ms-excel)
2008-05-16 10:54 UTC, jpginn
no flags Details
Screenshot showing the error in Calc 3.0 Beta (72.92 KB, image/png)
2008-05-16 15:34 UTC, jpginn
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jpginn 2008-05-16 10:52:36 UTC
Due to Excel's overloading of the INDEX syntax, Calc incorrectly imports some
INDEX formulae.

An Excel sheet containing the formula:  =INDEX(Range,n)  will, if the Range is a
single row or column, find the nth entry in the range, starting from either the
left or top of the range.

Importing to Calc, I get =INDEX(Range;n) and the error Err:504

Manually correcting it in Calc to =INDEX(Range;1;n) gives the expected result
the same as Excel.

Files are attached for both Excel and Calc.

Jason
Comment 1 jpginn 2008-05-16 10:53:30 UTC
Created attachment 53707 [details]
Calc file showing import error for INDEX
Comment 2 jpginn 2008-05-16 10:54:15 UTC
Created attachment 53708 [details]
Excel file that does not import INDEX correctly to Calc
Comment 3 oc 2008-05-16 11:28:15 UTC
Hi Eike, in Excel if the aray contains only one row or column the corresponding
argument is optional. That seems to be the problem here
Comment 4 oc 2008-05-16 12:20:03 UTC
already fixed in cws_odff3 by #i66930#

*** This issue has been marked as a duplicate of 66930 ***
Comment 5 oc 2008-05-16 12:20:39 UTC
closed because duplicate
Comment 6 jpginn 2008-05-16 15:33:06 UTC
Have just downloaded OOo 3.0 Beta, dated 7th May 2008, and the same error 
occurs.

Is there a more recent version I should be testing with?

Jason
Comment 7 jpginn 2008-05-16 15:34:55 UTC
Created attachment 53719 [details]
Screenshot showing the error in Calc 3.0 Beta
Comment 8 jpginn 2008-05-16 15:53:09 UTC
Issue 66930 is about the returned value of INDEX when correctly entered in Calc.
This issue is about how the formula is imported from .xls files, and is 
specific to the INDEX function because Calc doesn't allow optional parameters 
to be omitted in the middle of a parameter list.

Given that it is not possible to change the global behaviour of optional 
parameters in Calc, the import function should be modified to insert sensible 
values (1 in this case), in place of the missing optional parameters from Excel.

This is only required for single-row or single-column references: when Excel 
has a multi-row or multi-column reference, it needs both row and column 
parameters, just as Calc does.
Comment 9 ooo 2008-05-28 14:05:06 UTC
Actually this is a duplicate of issue 78781 that is fixed in CWS odff03, see
also http://sc.openoffice.org/servlets/ReadMsg?list=features&msgNo=269

For when the CWS will be integrated monitor
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fodff03


*** This issue has been marked as a duplicate of 78781 ***
Comment 10 ooo 2008-05-28 14:05:58 UTC
Closing dup.