- 浏览: 125467 次
- 性别:
- 来自: 南京
-
文章分类
- 全部博客 (97)
- Jquery (3)
- Oracle (11)
- JS (12)
- Struts2 (4)
- java (17)
- 课程 (1)
- Jboss (0)
- EJB (0)
- MAVEN (1)
- Design Pattern (0)
- css (2)
- axis1.4 (2)
- hessian (1)
- big data (1)
- Tomcat (3)
- redis (1)
- OVAL validate (1)
- express (1)
- eclipse (1)
- name node 无法启动 (1)
- hadoop (2)
- mysql (1)
- spring (1)
- sbt (1)
- angular (1)
- cas (1)
- JSSDK (1)
- 微信支付 (1)
- 小程序 (1)
- mybatis (1)
- jxta (1)
- idea (2)
- lay ui (1)
- sofa (1)
最新评论
-
duanwenping520:
这也太省事了把!
sj22
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>
<?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>
发表评论
-
微信 h5 分享
2019-09-30 09:53 258微信 h5分享 1.前端jsp 需要去除追加字符,传到后端进行 ... -
url 二级域名匹配
2016-10-14 16:32 589private static void urlMatche(S ... -
Https Basic Auth
2016-03-21 15:16 1206最近测试 Https 连接,遇到了些问题。 1. Cause ... -
unicdoe 转码
2015-12-04 16:15 501开始以为是乱码,我日。 http://www.faqs.org ... -
eclipse中取消show in Breadcrumb方法
2015-11-23 18:01 1677eclipse中取消show in Breadcrumb方法 ... -
sqserver order by 与java compareTo ,xml sting getBytes乱码
2015-08-04 23:10 6011.sqlsever orderby 顺序,取出list, 然 ... -
压缩 inputstream to zipoutputstream to bytearrayoutputstream
2014-10-21 20:06 1579http://stackoverflow.com/questi ... -
JMX demo
2014-02-07 11:05 945http://docs.oracle.com/javase/6 ... -
xsl dom 一个xml 引用另一个xml的某些节点
2014-02-07 11:07 659http://www.coderanch.com/t/1263 ... -
excel 导入导出
2013-03-20 21:35 830else if (type.equalsIgnoreCase( ... -
servlet 线程安全 application.setattribute,加上synchronized
2013-03-20 20:35 1669http://www.alixixi.com/Dev/Web/ ... -
sj22
2013-01-09 21:37 1019Organizations 字段名 含义 类型 缺省值 备 ... -
xerces jar和dom,jaxb解析冲突的解决方法
2012-10-12 22:41 32631.采用dom解析的时候,遇到Xerces.jar,会出现 E ... -
jaxb style
2012-10-12 11:55 718http://www.coderanch.com/t/4952 ... -
jsp out.print 乱码
2014-02-07 11:07 1309response.setContentType( " ... -
定时器使用Timer,timerTask
2012-02-01 17:14 8451.每隔10分钟触发 web.xml <listener ...
相关推荐
- 使用`Label`, `Number`, `DateTime`等类根据需要写入文本、数字或日期时间数据。 - 示例代码: ```java Label l = new Label(0, 0, "Header", headerFormat); sheet.addCell(l); ``` #### 五、注意事项 - ...
6. **处理日期和数字**:JXL库可以识别和处理日期和数字类型的数据,只需设置相应的单元格类型。 ```java Date date = new Date(); WritableCellFormat dateFormat = new WritableCellFormat(new ...
tw.WriteLine("<Cell><Data ss:Type=\"Number\">" + item.Age + "</Data></Cell>"); // 更多数据列 tw.WriteLine("</Row>"); } tw.WriteLine("</Styles>"); tw.WriteLine("</Workbook>"); httpResponse.Write...
WritableCellFormat dateFormat = new WritableCellFormat(new jxl.format.DateTime()); Date date = new Date(); Number dateCell = new Number(2, 0, date.getTime(), dateFormat); writableSheet.addCell...
datetime`进行格式化。 ### 8. 国际化(i18n) Freemarker支持多语言,可以通过`<#t>`和`<@i18n>`标签进行国际化资源的访问。 ### 9. 配置管理 Freemarker允许通过`freemarker.template.Configuration`类进行配置...