>But when I assign the value to the ss:ExpandedColumnCount using any of the above and try to open the xml in excel I get an error saying that there is a problem with the Table tag. If I hardcode the value ss:ExpandedColumnCount="5" then it works.
Then presumably your stylesheet has put something other than 5 in the value (NaN perhaps?). It should be a simple matter to open in the XML in an editor and find out.
>Also it doesn't like this line
<xsl:decimal-format name="fd1" decimal-separator="." grouping-separator="," NaN="#160;"/>
>Can someone shed some light ?
Can you shed some light? What was the error message?
My guess would be that you left out the ampersand in the NaN entity reference.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference