开发者

Error Converting an XML File to an Excel File

开发者 https://www.devze.com 2023-02-22 23:14 出处:网络
I get the following error wh开发者_如何转开发en I try to convert an XML file using XSLT to an Excel file:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号