手动构建xml xls 日期 datetime number type

http://ewbi.blogs.com/develops/2005/01/create_excels_s.html

<?xml version="1.0" ?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Font ss:FontName="Verdana" ss:Size="8" />
</Style>
<Style ss:ID="bold">
<Font ss:FontName="Verdana" ss:Bold="1" />
</Style>
<Style ss:ID="date">
<NumberFormat ss:Format="General Date" />
</Style>
<Style ss:ID="mycurrency">
<Font ss:FontName="Tahoma" ss:Size="10" ss:Bold="1" />
<NumberFormat ss:Format=""$"#,##0.00" />
</Style>
<Style ss:ID="mydate">
<NumberFormat ss:Format="m/d/yyyy" />
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table>
<Row ss:Index="1">
<Cell ss:Index="1">
<Data ss:Type="Number">1</Data>
</Cell>
<Cell ss:Index="2" ss:Formula="=R1C1+10">
<Data ss:Type="Number">11</Data>
</Cell>
<Cell ss:Index="3" ss:Formula="=R1C1+20">
<Data ss:Type="Number"></Data>
</Cell>
<Cell ss:Index="4" ss:Formula="=SUM(R1C1:R1C3)" ss:StyleID="mycurrency">
<Data ss:Type="Number"></Data>
</Cell>
</Row>
<Row ss:Index="2">
<Cell ss:Index="1">
<Data ss:Type="Boolean">1</Data>
</Cell>
</Row>
<Row ss:Index="3">
<Cell ss:Index="1">
<Data ss:Type="DateTime">2005-01-01T13:54:15.000</Data>
</Cell>
<Cell ss:Index="2" ss:StyleID="mydate">
<Data ss:Type="DateTime">2005-01-02T13:54:15.000</Data>
</Cell>
<Cell ss:Index="3" ss:StyleID="date">
<Data ss:Type="DateTime">2005-01-03T13:54:15.000</Data>
</Cell>
</Row>
<Row ss:Index="4">
<Cell ss:Index="1">
<Data ss:Type="String">abc</Data>
</Cell>
</Row>
<Row ss:Index="10">
<Cell ss:Index="5">
<Data ss:Type="Error">#N/A</Data>
</Cell>
</Row>
</Table>
</Worksheet>
<Worksheet ss:Name="Sheet2">
<Table>
<Row ss:Index="1">
<Cell ss:Index="1" ss:Formula="=Sheet1!R1C1 & " plus text"" ss:StyleID="bold">
<Data ss:Type="String"></Data>
</Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值