Possible DR relating to chart titles

Francis Cave francis at franciscave.com
Sat Feb 16 01:22:37 CET 2019


The chart in the sample spreadsheet is schema-valid. 

If the spreadsheet is opened and the chart style is changed before attempting to save the file, Excel reports a problem. 

If the spreadsheet is opened and saved without making a change, then re-opened and then the chart style is changed before attempting to save the file, Excel is happy. This implies that Excel silently fixes the problem on save, provided no change has been made to the file.

If the chart part is edited manually (using a package editor) to add <a:pPr>...</a:pPr> as Charlie states below, this time the spreadsheet can be opened, the chart style changed, and saved without complaint from Excel.

This is probably a bug in Excel and I don't see any evidence of a defect in the file format. On that basis, it probably isn't worth logging a DR, but it sounds as if an implementer note would be helpful to explain what further constraints Excel places on chart representations.

Francis



-----Original Message-----
From: Rex Jaeschke <rex at RexJaeschke.com> 
Sent: 15 February 2019 20:00
To: SC 34 WG4 <e-SC34-WG4 at ecma-international.org>
Subject: FW: Possible DR relating to chart titles

Should I log as that as a DR? Rex


-----Original Message-----
From: Charlie Clark <charlie.clark at clark-consulting.eu> 
Sent: Friday, February 15, 2019 8:46 AM
To: Rex Jaeschke <rex at rexjaeschke.com>
Subject: Possible DR relating to chart titles

Hiya Rex,

I'm not sure if this counts as a DR but there does currently seem to be an interoperability problem with MS Excel. I was initially informed of this by a user of my library: charts created with it cannot subsequently have styles applied to them by MS Excel; you can add them but Excel refuses to save them, see screenshot and sample file. As the OOXML we use is valid I referred him back to Microsoft, the result on this thread is that Excel seems to have a hard dependency on optional elements in Drawing ML:

https://social.msdn.microsoft.com/Forums/en-US/b37a1c97-7ded-47e8-b5eb-617ad32892c6/impossible-to-add-a-predefined-chart-style-to-charts-where-no-ltapprgt-tag-is-present-in-the?forum=os_binaryfile

The following is valid OOXML as part of a chart, and the can be read by MS Excel

<c:title xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart">
   <c:tx>
     <c:rich>
       <a:bodyPr
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" />
       <a:p xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
         <a:r>
           <a:t>TOTO</a:t>
         </a:r>
       </a:p>
     </c:rich>
   </c:tx>
</c:title>

Adding an empty paragraphs property element is sufficient for Excel to be happy

<c:title xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart">
   <c:tx>
     <c:rich>
       <a:bodyPr
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" />
       <a:p xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
         <a:pPr>
           <a:defRPr />
         </a:pPr>
         <a:r>
           <a:t>TOTO</a:t>
         </a:r>
       </a:p>
     </c:rich>
   </c:tx>
</c:title>

I'm pretty sure that this should be considered a bug in MS Excel, in which case it would be another example of the need for more extensive release notes. But, in the interests of interoperability, extending the implementers notes might also be acceptable. In terms of the narrative specification I'd like to see this covered but don't really see how this fairly exotic edge case could be reasonably handled.

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


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



More information about the sc34wg4 mailing list