Issue 116319

Summary: sheet reference error on Excel 2003 xml import
Product: Calc Reporter: bz922x <tdgoodman>
Component: open-importAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: damjan, issues
Version: OOO320m18Keywords: ms_interoperability
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: 4.2.0-dev
Developer Difficulty: ---
Attachments:
Description Flags
Excel 2003 xml file with cross sheet range reference
none
OOo spreadsheet file with correct cross sheet range references none

Description bz922x 2011-01-05 21:46:29 UTC
When reading an excel 2003 xml file with a cross sheet range reference, the
second (and subsequent sheet references are not correctly processed. 

With this in the XML file: ss:Formula="=SUM(Sheet1!RC:Sheet1!RC[1])"
The imported cell formula should be: =SUM(Sheet1.A1:Sheet1.B1)
but instead is shows as: =SUM(Sheet1.A1:#REF!.B1)
Comment 1 bz922x 2011-01-05 21:49:12 UTC
Created attachment 75476 [details]
Excel 2003 xml file with cross sheet range reference
Comment 2 bz922x 2011-01-05 21:50:32 UTC
Created attachment 75477 [details]
OOo spreadsheet file with correct cross sheet range references
Comment 3 bz922x 2011-01-05 22:02:34 UTC
To reproduce the error, import the Excel 2003 xml file, then look at sheet2 cell
A1. The reference error will be in the cell formula.
Comment 4 Marcus 2011-01-06 09:41:36 UTC
confirmed with OOo 3.3.0 RC8 (OOO330m18) on Solaris Sparc
Comment 5 damjan 2023-01-12 01:38:41 UTC
If we run:

xsltproc  main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 116319\ Test.xml

and we look at the formula cell on Sheet2:

<table:table-cell
  table:style-name="ta1"
  table:formula="oooc:=SUM([Sheet1.A1:[Sheet1.B1])"
  office:value-type="float"
  office:value="3">
    <text:p>3</text:p>
</table:table-cell>

the table:formula of:
oooc:=SUM([Sheet1.A1:[Sheet1.B1])

has 2 "[" but only 1 "]", and nests Sheet1.B1 in a possibly unnecessary or wrong pair of "[" and "]".