Missing definition on SpreadsheetML?

John Haug johnhaug at exchange.microsoft.com
Wed Jun 24 00:14:21 CEST 2015


Documentation is correct and no changes need to be made.  This is an old attribute Excel 2007 wrote that was removed from subsequent versions to properly conform to the standard.  We documented this error in [MS-OE376].  (It is not documented in [MS-OI29500] because that document is relevant to Office 2010 and later.)

Office documentation of its standards support (implementer notes):
https://msdn.microsoft.com/en-us/library/gg548604(v=office.12).aspx

From [MS-OE376]:
2.1.720 Part 4 Section 3.8.1, alignment (Alignment)
a. The standard does not contain a @mergeCell attribute on the alignment element.
Excel allows @mergeCell to be written on the alignment element. @mergeCell is not used by Office and is not necessary for interoperability.
This note applies to the following products: 2007, 2007 SP1, 2007 SP2.

The property likely exists in the Open XML SDK because that attribute may appear in Excel 2007 files.  Our old internal documentation described the mergeCell attribute as "A boolean value indicating if the cell is part of a block of merged cells."  I'm not sure how useful this is, since each worksheet part may have a mergeCells element which contains a list of mergeCell elements noting each merged range.  So, it may be ignorable for your purposes.

Francis - sorry, no idea why some elements have counts and others don't.

John

-----Original Message-----
From: Charlie Clark [mailto:charlie.clark at clark-consulting.eu] 
Sent: Monday, June 22, 2015 10:16 AM
To: 'SC 34 WG4'; Francis Cave
Subject: Re: Missing definition on SpreadsheetML?

Am .06.2015, 18:38 Uhr, schrieb Francis Cave <francis at franciscave.com>:

> This looks like an error in the OpenXML SDK documentation. I've tested 
> what Excel stores for merged cells and it is consistent with the 
> documentation in Part 1, i.e. the element 'mergeCell' is contained 
> within the element 'mergeCells' within 'worksheet'.

It looks like might be a throwback to an earlier version. I've been told that the originating application may have been MS Excel 2007 but I can't verify this. In all cases it has only occurred in DXF (Differential
Format) block. The SDK also validates such code.

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226

-----Original Message-----
From: Francis Cave [mailto:francis at franciscave.com] 
Sent: Monday, June 22, 2015 9:38 AM
To: 'Charlie Clark'; 'SC 34 WG4'
Subject: RE: Missing definition on SpreadsheetML?

This looks like an error in the OpenXML SDK documentation. I've tested what Excel stores for merged cells and it is consistent with the documentation in Part 1, i.e. the element 'mergeCell' is contained within the element 'mergeCells' within 'worksheet'.

Can someone (Chris?) explain why some collection elements - e.g. 'mergeCells' - have an @count attribute, while others - e.g. 'hyperlinks' - do not?

Francis



-----Original Message-----
From: Charlie Clark [mailto:charlie.clark at clark-consulting.eu] 
Sent: 22 June 2015 11:57
To: Rex Jaeschke
Cc: 'SC 34 WG4'
Subject: Missing definition on SpreadsheetML?

Hi Rex,

I've received some bug reports to my library about "mergeCell" missing in cell alignment definitions. I've checked both the transitional and the strict scheme and cannot find it there.

<xsd:complexType name="CT_CellAlignment">
   <xsd:attributename="horizontal" type="ST_HorizontalAlignment"  
use="optional"/>
   <xsd:attributename="vertical" type="ST_VerticalAlignment"  
use="optional"/>
   <xsd:attributename="textRotation" type="xsd:unsignedInt" use="optional"/>
   <xsd:attributename="wrapText" type="xsd:boolean" use="optional"/>
   <xsd:attributename="indent" type="xsd:unsignedInt" use="optional"/>
   <xsd:attributename="relativeIndent" type="xsd:int" use="optional"/>
   <xsd:attributename="justifyLastLine" type="xsd:boolean" use="optional"/>
   <xsd:attributename="shrinkToFit" type="xsd:boolean" use="optional"/>
   <xsd:attributename="readingOrder" type="xsd:unsignedInt" use="optional"/>
</xsd:complexType>	

However, in the Microsoft Office OpenXML SDK documentation, mergeCell is listed as a possible property. This seems to reflect the use of the control in the GUI. Can you clarify this?

Horizontal: Represents the following attribute in the schema: horizontal

Indent: Represents the following attribute in the schema: indent

JustifyLastLine: Represents the following attribute in the schema:  
justifyLastLine

LocalName Gets the local name of the element.

MergeCell:Represents the following attribute in the schema: mergeCell

ReadingOrder: Represents the following attribute in the schema:  
readingOrder

RelativeIndent: Represents the following attribute in the schema:  
relativeIndent

ShrinkToFit: Represents the following attribute in the schema: shrinkToFit

TextRotation: Represents the following attribute in the schema:  
textRotation

Vertical: Represents the following attribute in the schema: vertical

WrapText:Represents the following attribute in the schema: wrapText

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226



More information about the sc34wg4 mailing list