DR 17-0017 - Response - SML: Column Width and Formatting

Charlie Clark charlie.clark at clark-consulting.eu
Tue Jan 22 19:29:53 CET 2019


Am .01.2019, 23:10 Uhr, schrieb Alfred Hellstern  
<Alfred.Hellstern at microsoft.com>:

> Hello all,
> here's the response from the Excel product team for  
> 17-0017<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fonedrive.live.com%2Fview.aspx%2FPublic%2520Documents%2F2017%2FDR-17-0017.docx%3Fcid%3Dc8ba0861dc5e4adc&data=04%7C01%7CAlfred.Hellstern%40microsoft.com%7C3b1c6c49c3ae49b8988b08d674b7bd5d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636824729834909165%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C-1&sdata=kIl2R0w6p47IsrX8iCWMRhfgDnDdzOgsCgLqhlfCM%2FU%3D&reserved=0>:
>
> The DR appears to consider that a CT_Col element can contain only  
> partial information.  Such that a CT_Col for 8 through 12 could specify  
> an outline while separate CT_Col records include width specifications  
> for column 9.  In reality though the CT_Col attribute is always fully  
> specified with all attributes either being required or optional with  
> specified defaults (the one exception here is width, which Excel  
> defaults to 0 when it is omitted).  Any files where a single column is  
> covered by more than one CT_Col record essentially contains duplicate  
> (and possibly contradictory) specifications for that column.  In this  
> event Excel resolves the ambiguity by giving preference to whichever  
> record occurs later in the CT_Cols sequence.
>
> To address a specific example from the DR below.
> <cols>
>    <col min="1" max="5" width="10" hidden="true" />                   #  
> columns A:E
>    <col min="3" max="3" width="15"  
> />                                                 # column C
> </cols>
>
> The submitter appears to assume that col C does not specify a hidden  
> state, but hidden has a default of false so the later specification of  
> col C contradicts the earlier specification of A:E.  In this instance xl  
> would load col C as visible, respecting the later definition.  If the  
> author of a file wanted column C to also be hidden and wanted to remove  
> any ambiguity to that effect than they would need to specify the xml in  
> the below manner.

Thanks for the explanation. I'm not sure if I agree entirely with the  
details – I think it depends a bit on how you resolve the overloading –  
the important thing is that the narrative specification needs to have the  
additional information: 1-based indexing, conflict resolution. Ideally  
this would be done making reference to the default values contained in the  
schema, maybe using light grey for the default values.

> <cols>
>    <col min="1" max="2" width="10" hidden="1"/>
>    <col min="3" max="3" width="15" hidden="1"/>
>    <col min="4" max="5" width="10" hidden="1"/>
> </cols>

Sure, this is unambiguous but a reasonably common case seems to group  
columns into outlines while allowing the columns to have different widths.  
A common issue I see is that where width isn't specified, Excel treats it  
as "0" and not the sheet's defaultColumnWidth as noted above. This  
definitely needs adding to the description (ideally to the schema as well,  
of course, but schema changes…) because it's a real gotcha.

So, the text needs to reflect that CT_Col can is used for grouping into  
outlines and formatting columns, how conflicts are handled (with XML  
defaults taking precedence over group values) with an example.

Charlei
-- 
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


This message has been scanned for malware by Forcepoint. www.forcepoint.com


More information about the sc34wg4 mailing list