I get the following error wh开发者_如何转开发en I try to convert an XML file using XSLT to an Excel file:
XML ERROR in Table
REASON: Bad Value FILE: C:\DOCUME~1\user\LOCALS~1\TEMPOR~1\Content.MSO\B7F7687D.xls GROUP: Cell TAG: Data VALUE: 03/17/2011
It looks like you've probably not set the type of the cell's data correctly (ss:Type
).
You need to be generating something along the lines of
<Cell ss:StyleID="s1">
<Data ss:Type="DateTime">2011-03-17T00:00:00.000</Data>
</Cell>
and also set a style ID for the Cell id:
<Style ss:ID="s1">
<NumberFormat ss:Format="mm/dd/yyyy"/>
</Style>
Or failing that, you can just set the ss:Type to 'String' if it doesn't need to actually contain a date value.
精彩评论