Apache OpenOffice (AOO) Bugzilla – Issue 111781
export excel 2003 xml incorrectly uses A1 cell references instead of RC
Last modified: 2013-12-06 11:42:02 UTC
after entering a correct spreadsheet into OOo with simple cross-sheet references (actually, ANY cell references), OOo outputs as Excel 2003 XML the following incorrect A1 format: <Row ss:Height="12.8376"> <Cell ss:StyleID="Normal" ss:Formula="of:=['this sheet name has spaces'.A1]"><Data ss:Type="Number">1</Data></Cell> <Cell ss:StyleID="Normal" ss:Formula="of:=[Sheet1.A1]"><Data ss:Type="Number">1</Data></Cell> </Row> <Row ss:Height="12.8376"><Cell ss:Index="2" ss:StyleID="Normal"/></Row> MS Excel outputs the following for the same spreadsheet: <Row> <Cell ss:Formula="='this sheet name has spaces'!RC"><Data ss:Type="Number">1</Data></Cell> <Cell ss:Formula="=Sheet1!RC[-1]"><Data ss:Type="Number">1</Data></Cell> </Row> The RC format Excel uses allows the format 'Sheet name'!R1C1 for sheet names with spaces if you are doing cross-sheet references and want an absolute cell reference, or, SheetName!R1C1 if you are doing a sheet name without spaces and want an absolute cell reference, or, R1C1 if you are referencing the same sheet and want an absolute cell reference. The R1C1 absolute format is really handy for those who are doing the coding, because everything is indexed with numbers. and Excel 2003 Accepts it just fine, I tested the format. usually what you see coming OUT of Excel is pretty weird for RC addressing. I don't know if that format is documented anywhere or not as a standard. example: R12305C121
Created attachment 69581 [details] cross sheet references excel 2003 xml file
Created attachment 69582 [details] cross sheet references OOo generated excel 2003 xml file
I learned something about Excel cell format through experimentation. R1C1 in XML formulas is an ABSOLUTE cell address in Excel's use of the word. meaning, R1C1 comes out as $A$1 rather than A1 (surprised me). so all the RC-relative rules must apply. unfortunately.
Created attachment 82050 [details] Excel 2010 vs. Calc 4.1
See attachment. AOO410m1(Build:9750) - Rev. 1543812 Rev.1543812 Win 7