I've run into this issue once more and this time I had a little more time to understand the tagset code. As I put in my post all that time ago the issue is with the ss:Index values when merging cells. Using a trivial example : proc report data=sashelp.cars;
columns make model;
define make / style={tagattr="mergeacross:1"};
run; Generates XML like this: <Row ss:AutoFitHeight="1" ss:Height="18">
<Cell ss:StyleID="header__c" ss:MergeAcross="1" ss:Index="1">
<Data ss:Type="String">Make</Data>
</Cell>
<Cell ss:StyleID="header__c" ss:Index="2">
<Data ss:Type="String">Model</Data>
</Cell>
</Row> Which Excel 2010 refuses to open claiming it's a corrupt file. (I'm sure earlier Excel was more helpful and indicated which element in the XML it had an issue with). I've created a modified version of the tagset which correctly counts the columns when using mergeacross and outputs appropriate ss:Index values. So the same code generates XML like this: <Row ss:AutoFitHeight="1" ss:Height="18">
<Cell ss:StyleID="header__c" ss:MergeAcross="1" ss:Index="1">
<Data ss:Type="String">Make</Data>
</Cell>
<Cell ss:StyleID="header__c" ss:Index="3">
<Data ss:Type="String">Model</Data>
</Cell>
</Row> Which loads into Excel 2010 correctly. The amendments made to the SAS issued version 1.131 are: In event Row start, initialise a counter for merged columns (and unset in Row end) In event mergeAcross, maintain the count of merged columns In event cellStart, calculate a new value for ss:Index using the additional information. I think there may be more needed in mergeAcross to make this fix applicable for all uses. The full modified tagset is attached. I've called this v1.131.1 and referenced this forum message thread in the changes. Would be great if someone in SAS could take a look and use this as a base to issue a fix. Jonathan
... View more