﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-小石头-文章分类-转载区</title><link>http://www.blogjava.net/yongbing/category/18983.html</link><description>Excellence in any department can be attained only by the labor of a lifetime; it is not to be purchased at a lesser price.</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 08:51:17 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 08:51:17 GMT</pubDate><ttl>60</ttl><item><title>转:Exception 处理之最佳实践 </title><link>http://www.blogjava.net/yongbing/articles/93240.html</link><dc:creator>小石头</dc:creator><author>小石头</author><pubDate>Thu, 11 Jan 2007 11:05:00 GMT</pubDate><guid>http://www.blogjava.net/yongbing/articles/93240.html</guid><wfw:comment>http://www.blogjava.net/yongbing/comments/93240.html</wfw:comment><comments>http://www.blogjava.net/yongbing/articles/93240.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yongbing/comments/commentRss/93240.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yongbing/services/trackbacks/93240.html</trackback:ping><description><![CDATA[
		<div class="postTitle">
				<a class="postTitle2" id="viewpost1_TitleUrl" href="/buaacaptain/archive/2006/05/19/47119.html">
						<font color="#1a8bc8">转:Exception 处理之最佳实践 </font>
				</a>
		</div>原文：http://www.onjava.com/pub/a/onjava/2003/11/19/exceptions.html <br /><br />作者：Gunjan Doshi 2003-11-19 <br /><br />译者注：本文算是一篇学习笔记，仅供学习参考使用，有不妥之处，还请指出。2003-12-04 <br /><br /><br /><br />“本文是Exception处理的一篇不错的文章，从Java Exception的概念介绍起，依次讲解了Exception的类型（Checked/Unchecked），Exception处理的最佳实现： <br /><br />1． 选择Checked还是Unchecked的几个经典依据 <br /><br />2． Exception的封装问题 <br /><br />3． 如无必要不要创建自己得Exception <br /><br />4． 不要用Exception来作流程控制 <br /><br />5． 不要轻易的忽略捕获的Exception <br /><br />6． 不要简单地捕获顶层的Exception” <br /><br />——选自JAVADigest.Net对原文的介绍 <br /><br /><br /><br />“JAVADigest.Net这个站点不知道大家是否经常上，就像它的名字一样，它让我们更加有效的消化Java，或者它就像个中转站一样，至少对我是这样的，有些好的可以说是非常经典的技术文章，我都是通过它第一次获得，更多的时候我是为了偷懒才上JAVADigest.Net，因为如果是近期比较经典的文章，它上边都有介绍文字和原文连接。” <br /><br />——小插曲并非常荣幸地推荐JAVADigest.Net给你 <br /><br /><br /><br /><br /><br /><br /><br />关于异常处理的一个问题就是要对何时（when）和如何（how）使用它们做到了然于心。在本文中我将介绍一些关于异常处理的最佳实践，同时我也会涉及到最近争论十分激烈的checked Exception的使用问题。 <br /><br />作为开发员，我们都希望能写出解决问题并且是高质量的代码。不幸的是，一些副作用（side effects）伴随着异常在我们的代码中慢慢滋生。无庸置疑，没有人喜欢副作用（side effects）,所以我们很快就用我们自己的方式来避免它，我曾经看到一些聪明的程序员用下面的方式来处理异常： <br /><br /><br /><br />public void consumeAndForgetAllExceptions(){ <br />try { <br />...some code that throws exceptions <br />} catch (Exception ex){ <br />ex.printStacktrace(); <br />} <br />} <br /><br /><br /><br /><br />上边的代码有什么问题么？ <br /><br /><br /><br />在回答以前让我们想想怎样才是正确的？是的，一旦程序碰到异常，它就该挂起程序而“做”点什么。那么上边的代码是这样子的么？看吧，它隐瞒了什么？它把所有的“苦水”往肚里咽（在控制台打印出异常信息），然后一切继续，从表面上看就像什么都没有发生过一样……，很显然，上边代码达到的效果并不是我们所期望的。 <br /><br /><br /><br />后来又怎样？ <br /><br /><br /><br />public void someMethod() throws Exception{ <br />} <br /><br /><br /><br /><br />上边的代码又有什么问题？ <br /><br /><br /><br />很明显，上边的方法体是空的，它不实现任何的功能（没有一句代码），试问一个空方法体能抛出什么异常？当然Java并不阻止你这么干。最近，我也遇到类似的情景，方法声明会抛出异常，但是代码中并没有任何“机会”来“展示”异常。当我问开发员为什么要这样做的时候，他回答我说“我知道，它确实有点那个，但我以前就是这么干的并且它确实能为我工作。” <br /><br /><br /><br />在C++社区曾经花了数年实践来实践如何使用异常，关于此类的争论在java社区才刚刚开始。我曾经看到许多Java程序员针对使用异常的问题进行争论。如果对于异常处理不当的话，异常可以大大减慢应用程序的执行速度，因为它将消耗内存和CPU来创建、抛出并捕获异常。如果过分的依赖异常处理，代码对易读和易使用这两方面产生影响，以至于会让我们写出上边两处“糟糕”代码。 <br /><br /><br /><br />异常原理 <br /><br /><br /><br />大体上说，有三种不同的“情景”会导致异常的抛出： <br /><br />l 编程错误导致异常（Exception due Programming errors）: 这种情景下，异常往往处于编程错误（如：NullPointerException 或者 IllegalArgumentException）,这时异常一旦抛出，客户端将变得无能为力。 <br /><br />l 客户端代码错误导致异常（Exception due client code errors）: 说白点就是客户端试图调用API不允许的操作。 <br /><br />l 资源失败导致异常（Exception due to resource failures）: 如内存不足或网络连接失败导致出现异常等。这些异常的出现客户端可以采取相应的措施来恢复应用程序的继续运行。 <br /><br /><br /><br />Java中异常的类型 <br /><br />Java 中定义了两类异常： <br /><br />l Checked exception: 这类异常都是Exception的子类 <br /><br />l Unchecked exception: 这类异常都是RuntimeException的子类，虽然RuntimeException同样也是Exception的子类，但是它们是特殊的，它们不能通过client code来试图解决，所以称为Unchecked exception <br /><br />举个例子，下图为NullPointerException的继承关系： <br /><br /><br />Figure 1. Sample exception hierarchy <br /><br /><br /><br />图中，NullPointerException继承自RuntimeException，所以它是Unchecked exception. <br /><br /><br /><br />以往我都是应用checked exception多于Unchecked exception，最近，在java社区激起了一场关于checked exception和使用它们的价值的争论。这场争论起源于JAVA是第一个拥有Checked exception的主流OO语言这样一个事实，而C++和C#都是根本没有Checked exception，它们所有的异常都是unchecked。 <br /><br /><br /><br />一个checked exception强迫它的客户端可以抛出并捕获它，一旦客户端不能有效地处理这些被抛出的异常就会给程序的执行带来不期望的负担。 <br /><br /><br /><br />Checked exception还可能带来封装泄漏，看下面的代码： <br /><br /><br /><br />public List getAllAccounts() throws <br />FileNotFoundException, SQLException{ <br />... <br />} <br /><br /><br /><br /><br />上边的方法抛出两个异常。客户端必须显示的对这两种异常进行捕获和处理即使是在完全不知道这种异常到底是因为文件还是数据库操作引起的情况下。因此，此时的异常处理将导致一种方法和调用之间不合适的耦合。 <br /><br /><br /><br />接下来我会给出几种设计异常的最佳实践 （Best Practises for Designing the API） <br /><br /><br /><br />1． 当要决定是采用checked exception还是Unchecked exception的时候，你要问自己一个问题，“如果这种异常一旦抛出，客户端会做怎样的补救？” <br /><br />[原文：When deciding on checked exceptions vs. unchecked exceptions, ask yourself, "What action can the client code take when the exception occurs?"] <br /><br />如果客户端可以通过其他的方法恢复异常，那么这种异常就是checked exception；如果客户端对出现的这种异常无能为力，那么这种异常就是Unchecked exception；从使用上讲，当异常出现的时候要做一些试图恢复它的动作而不要仅仅的打印它的信息，总来的来说，看下表： <br /><br />Client's reaction when exception happens <br />Exception type <br /><br />Client code cannot do anything <br />Make it an unchecked exception <br /><br />Client code will take some useful recovery action based on information in exception <br />Make it a checked exception <br /><br /><br />此外，尽量使用unchecked exception来处理编程错误：因为unchecked exception不用使客户端代码显示的处理它们，它们自己会在出现的地方挂起程序并打印出异常信息。Java API中提供了丰富的unchecked excetpion，譬如：NullPointerException , IllegalArgumentException 和 IllegalStateException等，因此我一般使用这些标准的异常类而不愿亲自创建新的异常类，这样使我的代码易于理解并避免的过多的消耗内存。 <br /><br /><br /><br />2． 保护封装性（Preserve encapsulation） <br /><br />不要让你要抛出的checked exception升级到较高的层次。例如，不要让SQLException延伸到业务层。业务层并不需要（不关心？）SQLException。你有两种方法来解决这种问题： <br /><br />l 转变SQLException为另外一个checked exception，如果客户端并不需要恢复这种异常的话； <br /><br />l 转变SQLException为一个unchecked exception，如果客户端对这种异常无能为力的话； <br /><br />多数情况下，客户端代码都是对SQLException无能为力的，因此你要毫不犹豫的把它转变为一个unchecked exception，看看下边的代码： <br /><br /><br /><br />public void dataAccessCode(){ <br />try{ <br />..some code that throws SQLException <br />}catch(SQLException ex){ <br />ex.printStacktrace(); <br />} <br />} <br /><br /><br />上边的catch块紧紧打印异常信息而没有任何的直接操作，这是情有可原的，因为对于SQLException你还奢望客户端做些什么呢？（但是显然这种就象什么事情都没发生一样的做法是不可取的）那么有没有另外一种更加可行的方法呢？ <br /><br /><br /><br />public void dataAccessCode(){ <br />try{ <br />..some code that throws SQLException <br />}catch(SQLException ex){ <br />throw new RuntimeException(ex); <br />} <br />} <br /><br /><br /><br /><br />上边的做法是把SQLException转换为RuntimeException，一旦SQLException被抛出，那么程序将抛出RuntimeException,此时程序被挂起并返回客户端异常信息。 <br /><br /><br /><br />如果你有足够的信心恢复它当SQLException被抛出的时候，那么你也可以把它转换为一个有意义的checked exception, 但是我发现在大多时候抛出RuntimeException已经足够用了。 <br /><br /><br /><br />3． 不要创建没有意义的异常（Try not to create new custom exceptions if they do not have useful information for client code.） <br /><br />看看下面的代码有什么问题？ <br /><br />public class DuplicateUsernameException <br />extends Exception {} <br /><br /><br />它除了有一个“意义明确”的名字以外没有任何有用的信息了。不要忘记Exception跟其他的Java类一样，客户端可以调用其中的方法来得到更多的信息。 <br /><br />我们可以为其添加一些必要的方法，如下： <br /><br />public class DuplicateUsernameException <br />extends Exception { <br />public DuplicateUsernameException <br />(String username){....} <br />public String requestedUsername(){...} <br />public String[] availableNames(){...} <br />} <br /><br /><br /><br />在新的代码中有两个有用的方法：reqeuestedUsername(),客户但可以通过它得到请求的名称；availableNames(),客户端可以通过它得到一组有用的usernames。这样客户端在得到其返回的信息来明确自己的操作失败的原因。但是如果你不想添加更多的信息，那么你可以抛出一个标准的Exception: <br /><br />throw new Exception("Username already taken"); <br /><br /><br /><br />更甚的情况，如果你认为客户端并不想用过多的操作而仅仅想看到异常信息，你可以抛出一个unchecked exception: <br /><br />throw new RuntimeException("Username already taken"); <br /><br /><br /><br />另外，你可以提供一个方法来验证该username是否被占用。 <br /><br /><br /><br />很有必要再重申一下，checked exception应该让客户端从中得到丰富的信息。要想让你的代码更加易读，请倾向于用unchecked excetpion来处理程序中的错误（Prefer unchecked exceptions for all programmatic errors）。 <br /><br /><br /><br />4． Document exceptions. <br /><br />你可以通过Javadoc’s @throws 标签来说明（document）你的API中要抛出checked exception或者unchecked exception。然而，我更倾向于使用来单元测试来说明（document）异常。不管你采用哪中方式，你要让客户端代码知道你的API中所要抛出的异常。这里有一个用单元测试来测试IndexOutOfBoundsException的例子： <br /><br />public void testIndexOutOfBoundsException() { <br />ArrayList blankList = new ArrayList(); <br />try { <br />blankList.get(10); <br />fail("Should raise an IndexOutOfBoundsException"); <br />} catch (IndexOutOfBoundsException success) {} <br />} <br /><br /><br /><br />上边的代码在请求blankList.get(10)的时候会抛出IndexOutOfBoundsException,如果没有被抛出，将fail("Should raise an IndexOutOfBoundsException")显示说明该测试失败。通过书写测试异常的单元测试，你不但可以看到异常是怎样的工作的，而且你可以让你的代码变得越来越健壮。 <br /><br /><br /><br /><br /><br />下面作者将介绍界中使用异常的最佳实践（Best Practices for Using Exceptions） <br />1． 总是要做一些清理工作（Always clean up after yourself） <br /><br />如果你使用一些资源例如数据库连接或者网络连接，请记住要做一些清理工作（如关闭数据库连接或者网络连接），如果你的API抛出Unchecked exception，那么你要用try-finally来做必要的清理工作： <br /><br />public void dataAccessCode(){ <br />Connection conn = null; <br />try{ <br />conn = getConnection(); <br />..some code that throws SQLException <br />}catch(SQLException ex){ <br />ex.printStacktrace(); <br />} finally{ <br />DBUtil.closeConnection(conn); <br />} <br />} <br /><br />class DBUtil{ <br />public static void closeConnection <br />(Connection conn){ <br />try{ <br />conn.close(); <br />} catch(SQLException ex){ <br />logger.error("Cannot close connection"); <br />throw new RuntimeException(ex); <br />} <br />} <br />} <br /><br /><br /><br />DBUtil是一个工具类来关闭Connection.有必要的说的使用的finally的重要性是不管程序是否碰到异常，它都会被执行。在上边的例子中，finally中关闭连接，如果在关闭连接的时候出现错误就抛出RuntimeException. <br /><br /><br /><br />2． 不要使用异常来控制流程（Never use exceptions for flow control） <br /><br />下边代码中，MaximumCountReachedException被用于控制流程： <br /><br />public void useExceptionsForFlowControl() { <br />try { <br />while (true) { <br />increaseCount(); <br />} <br />} catch (MaximumCountReachedException ex) { <br />} <br />//Continue execution <br />} <br /><br />public void increaseCount() <br />throws MaximumCountReachedException { <br />if (count &gt;= 5000) <br />throw new MaximumCountReachedException(); <br />} <br /><br /><br /><br />上边的useExceptionsForFlowControl()用一个无限循环来增加count直到抛出异常，这种做法并没有说让代码不易读，但是它是程序执行效率降低。 <br /><br />记住，只在要会抛出异常的地方进行异常处理。 <br /><br /><br /><br />3． 不要忽略异常 <br /><br />当有异常被抛出的时候，如果你不想恢复它，那么你要毫不犹豫的将其转换为unchecked exception，而不是用一个空的catch块或者什么也不做来忽略它，以至于从表面来看象是什么也没有发生一样。 <br /><br /><br /><br />4． 不要捕获顶层的Exception <br /><br />unchecked exception都是RuntimeException的子类，RuntimeException又继承Exception,因此，如果单纯的捕获Exception,那么你同样也捕获了RuntimeException,如下代码： <br /><br />try{ <br />.. <br />}catch(Exception ex){ <br />} <br /><br /><br />一旦你写出了上边的代码（注意catch块是空的），它将忽略所有的异常，包括unchecked exception. <br /><br /><br /><br />5． Log exceptions just once <br /><br />Logging the same exception stack trace more than once can confuse the programmer examining the stack trace about the original source of exception. So just log it once. <br /><br /><br /><br />总结 <br /><br />这里给出了一些关于异常处理的一些最佳实践，我并不想开始另一轮的关于checked exception 和 unchecked exception的争论。你可以根据自己的实际情况定制自己异常处理，我坚信我们将有更好的办法来处理我们代码中的异常。 <br /><br /><br /><br />在此，我将感谢Bruce Eckel, Joshua Kerievsky, 和Somik Raha对于写这篇文章所给于我的支持。 <br /><br />参考资源： <br /><br />Related Resources <br />"Does Java need Checked Exceptions?" by Bruce Eckel <br />"Exceptional Java," by Alan Griffiths <br />"The trouble with checked exceptions: A conversation with Anders Hejlsberg, Part II" on Artima.com <br />"Checked exceptions are of dubious value," on C2.com <br />Conversation with James Gosling by Bill Venners <br />关于作者： <br /><br />Gunjan Doshi works with agile methodologies and its practices and is a Sun certified Java programmer. <br /><br />详细讨论见:http://forum.javaeye.com/viewtopic.php?t=2038  受益匪浅<br /><img src ="http://www.blogjava.net/yongbing/aggbug/93240.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yongbing/" target="_blank">小石头</a> 2007-01-11 19:05 <a href="http://www.blogjava.net/yongbing/articles/93240.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>通过构造XML数据流下载成Excel文件[转]</title><link>http://www.blogjava.net/yongbing/articles/92394.html</link><dc:creator>小石头</dc:creator><author>小石头</author><pubDate>Mon, 08 Jan 2007 07:38:00 GMT</pubDate><guid>http://www.blogjava.net/yongbing/articles/92394.html</guid><wfw:comment>http://www.blogjava.net/yongbing/comments/92394.html</wfw:comment><comments>http://www.blogjava.net/yongbing/articles/92394.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yongbing/comments/commentRss/92394.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yongbing/services/trackbacks/92394.html</trackback:ping><description><![CDATA[
		<div class="postTitle">
				<a class="postTitle2" id="viewpost1_TitleUrl" href="/wujiaqian/archive/2006/12/11/86970.html">
						<font color="#1a8bc8">通过构造XML数据流下载成Excel文件[原]</font>
				</a>
		</div>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p>    前些天做了一个EXCEL数据下载的东西,发现当数据超过10万行之后,就会内存溢出(用的是本机TOMCAT测试,内存有限,没能调过),新做一种方式,来感觉一下,发现速度有点慢,其他还可以. </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-bidi-font-size: 10.5pt">一、问题描述</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.5pt">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<span style="mso-tab-count: 1">    </span>
				</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">该问题出现是因为在导出文件之后</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
				</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">用户下载的是</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">.csv</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">文件，如果用文本编辑器打开可以查看所有记录，但是如果用</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">excel</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">打开就出现一个</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">sheet</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">最多</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">6</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">万条的记录。因此就不可以使用保存为</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">csv</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">文件来实现</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">excel</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">文件的下载，需要使用新的方式去实现。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">
						<span style="mso-tab-count: 1">    </span>
				</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">如果使用</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">jxl</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">开发包在</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">web</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">后台去创建</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">Excel</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">文件，如果数据量比较大，则用户需要等待很长很长的时间才可以下载到，因为</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">jxl</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">的对于</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">excel</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">文件的操作都是对象级的</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">,</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">文件中每一个格子都是一个</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">cell</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">对象，需要后台去</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-hansi-font-family: Verdana">new</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Courier New'">。所以还需要考虑别的方式。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<span style="mso-tab-count: 1">    </span>
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'; mso-bidi-font-size: 10.5pt">二、实现灵感</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.5pt">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<span style="mso-tab-count: 1">    </span>Excel</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">文件打开之后选择另存为可以保存为</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">XML</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">类型文件，因此就考虑构造符合</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">Excel</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">可以打开的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">XML</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">类型文件，并且对该</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">XML</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">文件进行最简单化处理，去除</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">Excel</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">文件中的每个</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">cell</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">style</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">定义、</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">XML</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">文件头部的多余信息，最后整理出一个符合资讯平台所下载的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">Excel</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">文件的格式</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">,</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'">请看下面：</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> </o:p>
				</span>
		</p>
		<table class="MsoTableGrid" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: #e6e6e6; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellspacing="0" cellpadding="0" border="1">
				<tbody>
						<tr style="HEIGHT: 163.05pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes">
								<td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 426.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 163.05pt; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" valign="top" width="568">
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&lt;!—XML</span>
												<span style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">文件头部</span>
												<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'">--//&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;?xml version="1.0"?&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<span style="mso-spacerun: yes"> </span>xmlns:o="urn:schemas-microsoft-com:office:office"<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<span style="mso-spacerun: yes"> </span>xmlns:x="urn:schemas-microsoft-com:office:excel"<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<span style="mso-spacerun: yes"> </span>xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<span style="mso-spacerun: yes"> </span>xmlns:html="http://www.w3.org/TR/REC-html40"&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<o:p> </o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&lt;!—Excel</span>
												<span style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">文件第一个</span>
												<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'">SHEET --//&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Worksheet ss:Name="sheet0"&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Table&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Row&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa0&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa1&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa2&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;/Row&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Row&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa0&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa1&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa2&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;/Row&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;/Table&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;/Worksheet&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<o:p> </o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&lt;!—Excel</span>
												<span style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">文件第二个</span>
												<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'">SHEET --//&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Worksheet ss:Name="sheet1"&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Table&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<span style="mso-tab-count: 1">    </span>&lt;!— </span>
												<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">一行数据</span>
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">--//&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Row&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa0&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa1&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa2&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;/Row&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Row&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa0&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa1&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Cell&gt;&lt;Data ss:Type="String"&gt;aa2&lt;/Data&gt;&lt;/Cell&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;/Row&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;/Table&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;/Worksheet&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<o:p> </o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;/Workbook&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<o:p> </o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&lt;!-- XML</span>
												<span style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">文件结束</span>
												<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'">--//&gt;<o:p></o:p></span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
														<o:p> </o:p>
												</span>
										</p>
								</td>
						</tr>
				</tbody>
		</table>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">注释：</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">a</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">、</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Worksheet ss:Name="sheet0"&gt;<span style="mso-spacerun: yes">  </span></span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">引号内部的是该</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">sheet</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">的名称。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">b</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">、</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">&lt;Data ss:Type="String"&gt;aa1&lt;/Data&gt; <span style="mso-spacerun: yes"> </span>ss:Type</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">的值是用来定义该</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">cell</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">格数据的类型，例如可以为</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">Number,</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">表是该</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">cell</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">格数据是数字。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-bidi-font-size: 10.5pt">三、实现方式</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.5pt">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<span style="mso-tab-count: 1">    </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">通过第一步的分析可以发现只要我们构建这样格式的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">XML</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">数据，就可以通过</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">Excel</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">打开，并且可以实现分</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">sheet</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">的样式。但是数据下载到用户本地是</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">XML</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">类型的话，那是没什么意义的，就算打开方式选择使用</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">Excel</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">可以打开，因此如何将用户下载的文件类型改为</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">XLS</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">呢？这里就可以通过在下载的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">servlet</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">中设置</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">response.setContentType("application/vnd.ms-excel")</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">来实现。<br /></span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>我实现了五个类来封闭XML字符串(CellData,TableCell,TableRow,WorkBook,WorkSheet),写了一个测试类<br /><br />package com.hoten.util.xmlxls;</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>import java.util.List;<br />import java.util.ArrayList;</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
								<font color="#ff0000">public class <strong>WorkBook</strong> {<br /></font> private final static String XML_HEARDER = "&lt;?xml version=\"1.0\"?&gt;";<br /> <br /> private List sheetList = new ArrayList(); //存放每行多个sheet的list<br /> <br /> /**<br />  * 取得workbook的xml文件的头部字符串<br />  * @return<br />  */<br /> private String getHeader(){  <br />  return XML_HEARDER + <br />    "&lt;Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"" + Contants.SEP_N + <br />    " xmlns:o=\"urn:schemas-microsoft-com:office:office\"" + Contants.SEP_N + <br />    " xmlns:x=\"urn:schemas-microsoft-com:office:excel\"" +  Contants.SEP_N + <br />    " xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"" + Contants.SEP_N + <br />    " xmlns:html=\"<a href="http://www.w3.org/TR/REC-html40/"><font color="#1a8bc8">http://www.w3.org/TR/REC-html40\</font></a>"&gt;" + Contants.SEP_N ; <br /> } <br /> <br /> private String getFoot(){<br />  return "&lt;/Workbook&gt;";<br /> }<br /> <br /> public String toString(){<br />  StringBuffer strBuff = new StringBuffer();<br />  <br />  strBuff.append(getHeader());<br />  <br />  int len = sheetList.size();<br />  for(int i=0;i&lt;len;i++){<br />   WorkSheet sheet = (WorkSheet)sheetList.remove(0);<br />   strBuff.append(sheet.toString());<br />   sheet = null;<br />  }  <br />  sheetList.clear();<br />  <br />  strBuff.append(getFoot());<br />  <br />  return strBuff.toString();<br /> }<br /> <br /> public void addSheet(WorkSheet sheet){<br />  sheetList.add(sheet);<br /> }<br /> <br /> public void removeSheet(int i){<br />  sheetList.remove(i);<br /> }  <br />}<br /><br /><br />package com.hoten.util.xmlxls;</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>import java.util.List;<br />import java.util.ArrayList;</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
								<font color="#ff0000">public class <strong>WorkSheet </strong>{</font>
								<br /> <br /> private String name = ""; //该sheet的name<br /> <br /> private List rowList = new ArrayList(); //存放每行多个row的list<br /> <br /> public String toString(){<br />  StringBuffer strBuff = new StringBuffer();<br />  <br />  strBuff.append("&lt;Worksheet ss:Name=\"" + name + "\"&gt;").append(Contants.SEP_N);<br />  strBuff.append("&lt;Table&gt;").append(Contants.SEP_N);<br />  <br />  int len = rowList.size();<br />  for(int i=0;i&lt;len;i++){<br />   TableRow row = (TableRow)rowList.remove(0);<br />   strBuff.append(row.toString());<br />   row = null;<br />  }  <br />  rowList.clear();<br />  <br />  strBuff.append("&lt;/Table&gt;").append(Contants.SEP_N);<br />  strBuff.append("&lt;/Worksheet&gt;").append(Contants.SEP_N);<br />  <br />  return strBuff.toString();<br /> }<br /> <br /> public void addRow(TableRow row){<br />  rowList.add(row);<br /> }<br /> <br /> public void removeRow(int i){<br />  rowList.remove(i);<br /> }</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> public String getName() {<br />  return name;<br /> }</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> public void setName(String name) {<br />  this.name = name;<br /> } <br />}<br /><br /><br />package com.hoten.util.xmlxls;</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>import java.util.List;<br />import java.util.ArrayList;</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
								<font color="#ff0000">public class <strong>TableRow</strong> {</font>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> private List cellList = new ArrayList(); //存放每行多个cell的list<br /> <br /> <br /> public String toString(){<br />  StringBuffer strBuff = new StringBuffer();<br />  <br />  strBuff.append("&lt;Row&gt;").append(Contants.SEP_N);</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>  //循环显示每行的cell<br />  int len = cellList.size();<br />  for(int i=0;i&lt;len;i++){<br />   TableCell cell = (TableCell)cellList.remove(0);<br />   strBuff.append(cell.toString()).append(Contants.SEP_N);<br />   cell = null;   <br />  }<br />  cellList.clear();<br />  <br />  strBuff.append("&lt;/Row&gt;").append(Contants.SEP_N);<br />  <br />  return strBuff.toString();<br /> } <br /> <br /> public void addCell(TableCell cell){<br />  cellList.add(cell);<br /> }<br /> <br /> public void removeCell(int i){<br />  cellList.remove(i);<br /> }<br /> <br />}<br /><br /><br />package com.hoten.util.xmlxls;</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
								<font color="#ff0000">public class <strong>TableCell</strong> {</font>
								<br /> private String index = ""; //cell在每行显示的索引位置,可以不填<br /> <br /> private CellData data = new CellData(); //cell的数据对象</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> public CellData getData() {<br />  return data;<br /> }</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> public void setData(CellData data) {<br />  this.data = data;<br /> }</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> public String getIndex() {<br />  return index;<br /> }</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p> public void setIndex(String index) {<br />  this.index = index;<br /> }<br /> <br /> <br /> public String toString(){<br />  return "&lt;Cell&gt;" + data.toString() + "&lt;/Cell&gt;";<br /> }<br /> <br />}<br /><br /><br />package com.hoten.util.xmlxls;</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
								<font color="#ff0000">public class <strong>CellData</strong> {</font>
								<br /> private String type = "String"; //cell数据类型<br /> private String value = ""; //cell数据<br /> <br /> public String getType() {<br />  return type;<br /> }<br /> public void setType(String type) {<br />  this.type = type;<br /> }<br /> public String getValue() {<br />  return value;<br /> }<br /> public void setValue(String value) {<br />  this.value = value;<br /> }<br /> <br /> <br /> public String toString(){<br />  return "&lt;Data ss:Type=\"" + type + "\"&gt;" + value + "&lt;/Data&gt;";<br /> }<br />}<br /><br /><br /><br />package com.hoten.util.xmlxls;</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>
								<font color="#ff0000">public class <strong>Contants </strong>{</font>
								<br /> public final static String SEP_N = "\n";<br /> /**<br />  * XML中常量定义<br />  */<br /> public final static String SS_NAME = "ss:Name";<br /> public final static String SS_INDEX = "ss:Index";<br /> public final static String SS_TYPE = "ss:Type";</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
						<o:p>}<br /><br /><br /><br />测试的方法:<br />PrintWriter out = response.getWriter();<br />         // 设置响应头和下载保存的文件名<br />         response.setContentType("application/vnd.ms-excel");<br />         response.setHeader("Content-Disposition","attachment; filename=\""+Chinese.toPage(fileNametemp)+"\"");<br />         <br />         String rows_temp = request.getParameter("rows");//页面传过来的每个SHEET可以存放的条数<br />   if (rows_temp == null){<br />    rows_temp = "20000";<br />   }<br />   int count_rows = Integer.parseInt(rows_temp);//一个SHEET有多行<br />         <br />         WorkBook book = new WorkBook();<br />         Vector v_Rs = RsToVector.ResultSetToVector(rs);// 把RS的值转换成VECTOR,这个可以看我上一版本,上面有详细的写法<br />         <br />         if (v_Rs != null) {<br />    int a = v_Rs.size();    <br />    int sheet_count = a / count_rows;// 30000行一个sheet。<br />    <br />    if (sheet_count &gt;0){//大于0，则需要多个SHEET<br />     for (int i = 0;i&lt;sheet_count;i++){<br />      WorkSheet sheet = new WorkSheet();//创建一个新的SHEET<br />      sheet.setName("sheet" + i);//设置SHEET的名称<br />           <br />      for (int b = i* count_rows ;b&lt;(i+1) * count_rows ;b++){       <br />       //temp_v.add(v_Rs.get(b));<br />       Vector temp_v = new Vector();<br />       temp_v =(Vector) v_Rs.get(b);       <br />       //取出一个对象,把对象的值放到EXCEL里<br />       TableRow row = new TableRow();//设置行 <br />       for(int m=0;m&lt;numColumns;m++){<br />              TableCell cell = new TableCell();<br />              CellData data = new CellData();<br />              data.setValue((String)temp_v.get(m));<br />              cell.setData(data);              <br />              row.addCell(cell);<br />             }             <br />             sheet.addRow(row);<br />      } <br />      book.addSheet(sheet);<br />     }<br />     //还有剩余的数据<br />     if (sheet_count * count_rows &lt; a){<br />      WorkSheet sheet = new WorkSheet();//创建一个新的SHEET<br />      sheet.setName("sheet" + sheet_count);//设置SHEET的名称<br />       <br />      for (int c = sheet_count* count_rows ;c&lt;a ;c++){       <br />       Vector temp_vv = new Vector();<br />       temp_vv =(Vector) v_Rs.get(c);<br />       //取出一个对象,把对象的值放到EXCEL里<br />       TableRow row = new TableRow();//设置行<br />       for(int m=0;m&lt;numColumns;m++){<br />              TableCell cell = new TableCell();<br />              CellData data = new CellData();<br />              data.setValue((String)temp_vv.get(m));<br />              cell.setData(data);              <br />              row.addCell(cell);<br />             }             <br />             sheet.addRow(row);       <br />      }<br />      book.addSheet(sheet);       <br />     }<br />    }else{<br />     <br />     <br />      WorkSheet sheet = new WorkSheet();//创建一个新的SHEET<br />      sheet.setName("sheet1");//设置SHEET的名称<br />           <br />      for (int bb=0  ;bb&lt;a ;bb++){       <br />       //temp_v.add(v_Rs.get(b));<br />       Vector temp_v = new Vector();<br />       temp_v =(Vector) v_Rs.get(bb);       <br />       //取出一个对象,把对象的值放到EXCEL里<br />       TableRow row = new TableRow();//设置行 <br />       for(int m=0;m&lt;numColumns;m++){<br />              TableCell cell = new TableCell();<br />              CellData data = new CellData();<br />              data.setValue((String)temp_v.get(m));<br />              cell.setData(data);              <br />              row.addCell(cell);<br />             }             <br />             sheet.addRow(row);<br />      } <br />      book.addSheet(sheet);<br />    }<br />         <br />    out.print(book.toString());<br />   }<br />    以上拼XML的时候重复代码比较多,可以写一个公用的方法,,我为了把XML描述的详细一点,把这些都封装成了对象,但在拼字符串的时候,对象就会太多,以后如果改版的话,可以把它尽量封装少一点对象,这样速度可能会快一点,内存可能会少用一点.</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">
				</span> </p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'">转 : <a href="/wujiaqian/archive/2006/12/11/86970.html">http://www.blogjava.net/wujiaqian/archive/2006/12/11/86970.html</a></span>
		</p>
<img src ="http://www.blogjava.net/yongbing/aggbug/92394.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yongbing/" target="_blank">小石头</a> 2007-01-08 15:38 <a href="http://www.blogjava.net/yongbing/articles/92394.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>根据RS取值的条数,动态生成EXCEL的工作簿[转] </title><link>http://www.blogjava.net/yongbing/articles/92392.html</link><dc:creator>小石头</dc:creator><author>小石头</author><pubDate>Mon, 08 Jan 2007 07:35:00 GMT</pubDate><guid>http://www.blogjava.net/yongbing/articles/92392.html</guid><wfw:comment>http://www.blogjava.net/yongbing/comments/92392.html</wfw:comment><comments>http://www.blogjava.net/yongbing/articles/92392.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yongbing/comments/commentRss/92392.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yongbing/services/trackbacks/92392.html</trackback:ping><description><![CDATA[
		<div class="postTitle">
				<a class="postTitle2" id="viewpost1_TitleUrl" href="/wujiaqian/archive/2006/12/08/86269.html">
						<font color="#1a8bc8">根据RS取值的条数,动态生成EXCEL的工作簿[原]</font>
				</a>
		</div>
		<p>      以前公司在做下载数据的时候,主要是用以下这种方式：<br /><br />      <font color="#0000ff">response.setContentType("APPLICATION/OCTET-STREAM");<br /><br />      response.setHeader("Content-Disposition", "attachment; filename=\""+ Chinese.toPage(fileName) + "\"");</font><br /><br />      但这有个不好的就是它只能打开一个EXCEL的一个工作簿，如果数据量非常大的话，后面的数据会丢失，根据这个BUG，我重新做了一个动态生成EXCEL工作薄的例子，以方便后面对此应用的改造。<br /><br /> 首先从数据库里取数据的时候，不知道行，列，这样就需要一个动作，把RS转换成一个VECTOR，此对象里每一行也是一个VECTOR<br />  public static Vector ResultSetToVector(ResultSet rs) {<br />    try {<br />      Vector rows = new Vector();<br />      ResultSetMetaData rsmd = rs.getMetaData();<br />      Vector columnHeads = new Vector();</p>
		<p>      for (int i = 1; i &lt;= rsmd.getColumnCount(); i++) {<br />        columnHeads.addElement(rsmd.getColumnName(i));<br />      }</p>
		<p>      Vector currentRow;<br />      while(rs.next()){<br />        currentRow = new Vector();<br />        for (int i = 1; i &lt;= rsmd.getColumnCount(); i++) {<br />          currentRow.addElement(Chinese.fromDatabase(rs.getString(i)));<br />        }<br />        rows.addElement(currentRow);<br />      }<br />      return rows;<br />    }<br />    catch (Exception err) {<br />      Log.printError(err, "", "", log);<br />      return null;<br />    }<br />    finally{<br />      try {<br />        if(rs!=null){<br />          rs.close();<br />          rs = null;<br />        }<br />      }<br />      catch (Exception ex) {<br />      }<br />    }<br /><br /> 再通过写一个方法，把VECTOR的值放到EXCEL里去。<br />   ResultSetMetaData rmeta = rs.getMetaData();<br />   int numColumns = rmeta.getColumnCount();//取多少行<br />   String fileNametemp = "c:\\"+fileName;<br />   fileNametemp = fileNametemp.substring(0,fileNametemp.lastIndexOf("."))+CTime.getTime(12)+".xls";<br />   <br />   java.io.File file = new java.io.File(fileNametemp);<br />   if (file.exists()) {<br />    file.delete();<br />   }<br />   String rows_temp = request.getParameter("rows");//页面传过来的每个SHEET可以存放的条数<br />   if (rows_temp == null){<br />    rows_temp = "20000";// 一个表单默认20000行。<br />   }<br />   int count_rows = Integer.parseInt(rows_temp);<br />   WritableWorkbook wb = Workbook.createWorkbook(file);<br />     <br />    Vector v_Rs = RsToVector.ResultSetToVector(rs);// 把RS的值转换成VECTOR<br />   boolean fg = true;    <br />    if (v_Rs != null) {<br />    int a = v_Rs.size();    <br />    int sheet_count = a / count_rows;    <br />    if (sheet_count &gt;0){//大于0，则需要多个SHEET<br />     for (int i = 0;i&lt;sheet_count;i++){<br />      Vector temp_v = new Vector();<br />      for (int b = i* count_rows ;b&lt;(i+1) * count_rows ;b++){<br />       <br />       temp_v.add(v_Rs.get(b));<br />      }      <br />      writeExcel(wb,"sheet"+i,temp_v,numColumns,sheet_count);//EXCEL对象、单元薄名、数据、行数、第几个单元薄      <br />     }    <br />     <br />     if (sheet_count * count_rows &lt; a){//不是正好，还有剩余<br />      Vector temp_vv = new Vector();<br />      for (int c = sheet_count* count_rows ;c&lt;a ;c++){       <br />       temp_vv.add(v_Rs.get(c));<br />      }<br />      writeExcel(wb,"sheet"+(sheet_count+1),temp_vv,numColumns,sheet_count+1);//EXCEL对象、单元薄名、数据、行数、第几个单元薄 <br />     }<br />    }else{<br />     writeExcel(wb,"sheet"+sheet_count,v_Rs,numColumns,0);//EXCEL对象、单元薄名、数据、行数、第几个单元薄 <br />    }<br />    fg = true;<br />   }else{<br />    fg = false;<br />   }<br />   wb.write();<br />   wb.close();<br />   String msgs = "";<br />   PrintWriter out = response.getWriter();<br />   if (fg){<br />    msgs = "保存的文件名是"+fileNametemp;<br />    msgs = Chinese.toPage(msgs);    <br />   }else{<br />    msgs = Chinese.toPage("没有数据导出！");    <br />   }<br />   int seg = msgs.indexOf(":");<br />   msgs = msgs.substring(0,seg)+":\\"+msgs.substring(seg+1,msgs.length());<br />   out.println("&lt;script&gt;alert('"+msgs+"');window.close();&lt;/script&gt;");<br /><br /><br />   <br />写EXCLE的方法<br />   /**<br />     * 写Excel文件<br />     * @param filepath String<br />     * @param sheetname String  工作簿名称<br />     * @param list Vector   内容<br />     * @param colum int     列数<br />     * @return boolean<br />     */<br /> private boolean writeExcel(WritableWorkbook wb ,String sheetname,<br />   Vector list, int colum,int count) {<br />  String temp = "";<br />  String[] s;<br />  int i = 0;<br />  try {<br />   if (list == null) {<br />    return false;<br />   }<br />   <br />   WritableSheet ws = wb.createSheet(sheetname, count);<br />   if (colum == 1) {<br />    while (i != list.size() &amp;&amp; list.size() &gt; 0) {<br />     temp = (String) list.get(i);<br />     Label labelC = new Label(i, 0, temp);<br />     ws.addCell(labelC);<br />     i++;<br />    }<br />   } else {<br />    while (i != list.size() &amp;&amp; list.size() &gt; 0) {<br />     //s = (String[]) list.get(i);<br />     Vector tm = (Vector) list.get(i);<br />     if (tm == null) {<br />      continue;<br />     } else {<br />      int kk = tm.size();<br />      for (int j = 0; j &lt; kk; j++) {<br />       temp = (String)tm.get(j);<br />       Label labelC = new Label(j, i, temp);<br />       ws.addCell(labelC);<br />      }<br />     }<br />     i++;<br />    }<br />   }<br />  } catch (Exception ex) {<br />   Log.printError(ex, "写excel文件错误", "", "writeexcel.log");<br />   return false;<br />  }<br />  return true;<br /> }<br /><br /><br /><br />以上方法也有一个问题，就是当程序写100000条数据以后，速度会慢下来，我看了WritableWorkbook 的构造方法的时候，可以生成一个OUTPUTSTREAM对象的，我想可以用这个来做，速度可能会上去，但具体也没有试，如何有哪位哥们试过了，把性能跟兄弟分享一下！谢谢了！<br /><br />转自 : <a href="/wujiaqian/archive/2006/12/08/86269.html">http://www.blogjava.net/wujiaqian/archive/2006/12/08/86269.html</a></p>
<img src ="http://www.blogjava.net/yongbing/aggbug/92392.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yongbing/" target="_blank">小石头</a> 2007-01-08 15:35 <a href="http://www.blogjava.net/yongbing/articles/92392.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用JXL写EXCEL方法的封装[转] </title><link>http://www.blogjava.net/yongbing/articles/92382.html</link><dc:creator>小石头</dc:creator><author>小石头</author><pubDate>Mon, 08 Jan 2007 07:19:00 GMT</pubDate><guid>http://www.blogjava.net/yongbing/articles/92382.html</guid><wfw:comment>http://www.blogjava.net/yongbing/comments/92382.html</wfw:comment><comments>http://www.blogjava.net/yongbing/articles/92382.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yongbing/comments/commentRss/92382.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yongbing/services/trackbacks/92382.html</trackback:ping><description><![CDATA[
		<div class="postTitle">
				<strong>前些日子写了一些关于EXCEL解决的方法,今天用JXL写文件的方法,来处理。把封装好的东西发上来，大家一起看看。<br /></strong>
				<br />
				<font face="Courier New">import java.util.*;<br />import java.io.*;<br />import java.sql.*;<br />import jxl.*;<br />import jxl.write.*;</font>
		</div>
		<p>
				<font face="Courier New">/**<br /> * 提供了常用的Excel读取和写入的方法<br /> * &lt;p&gt; * Title: * &lt;/p&gt;<br /> * &lt;p&gt; * Description: * &lt;/p&gt;<br /> * &lt;p&gt; * Copyright: Copyright (c) 2006 * &lt;/p&gt;<br /> * &lt;p&gt; * Company: * &lt;/p&gt;<br /> *  * @author wujiaqian * @version 1.0<br /> */</font>
		</p>
		<p>
				<font face="Courier New">public class Excel {<br /> int sheetCount = 1; // excel工作簿，默认为1</font>
		</p>
		<p>
				<font face="Courier New"> WritableWorkbook wwb = null; // 构建Workbook对象,只读Workbook对象</font>
		</p>
		<p>
				<font face="Courier New"> Vector vSheet = null;</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 无参构造函数，生成默认名字的excel文件<br />  */<br /> public Excel() {<br />  this("noName.excel");<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 带有一个String类型参数的构造函数<br />  * <br />  * @param fileName<br />  * String 将要生成的excel文件名<br />  */<br /> public Excel(String fileName) {<br />  try {<br />   wwb = Workbook.createWorkbook(new File(fileName));<br />   vSheet = new Vector(5);<br />  } catch (Exception e) {<br />  }<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 带有一个File类型参数的构造函数<br />  * <br />  * @param fileName<br />  *  String 将要生成的excel文件名<br />  */<br /> public Excel(File file) {<br />  try {<br />   wwb = Workbook.createWorkbook(file);<br />   vSheet = new Vector(5);<br />  } catch (Exception e) {<br />  }<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 读取一个EXCEL文件的所有行和列,在同一行上的数据以一个String的形式保存在Vector中,各列数据以","号分割<br />  * <br />  * @param fileName<br />  *        String 文件名<br />  * @throws Exception<br />  * @return Vector<br />  */<br /> public static Vector readFromExcel(String fileName) throws Exception {<br />  Vector v = new Vector();<br />  File file = new File(fileName);<br />  if (!file.isFile()) {<br />   return null;<br />  }<br />  v = readExl(file, -1, -1);<br />  return v;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> public static Vector readFromExcel(File file) throws Exception {<br />  Vector v = new Vector();<br />  if (!file.isFile()) {<br />   return null;<br />  }<br />  v = readExl(file, -1, -1);<br />  return v;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 读取一行多列或者一列多行<br />  * <br />  * @param fileName<br />  *        String 文件名<br />  * @param rowORcol<br />  *        int 第几行或者第几列<br />  * @param flag<br />  *        String ROW表示前面一个参数的值指的是行数，行COL表示前面一个参数的值指的是列数<br />  * @throws Exception<br />  * @return Vector<br />  */<br /> public static Vector readFromExcel(String fileName, int rowORcol,<br />   String flag) throws Exception {<br />  Vector v = new Vector();<br />  File file = new File(fileName);<br />  if (!file.isFile()) {<br />   return null;<br />  }<br />  if (flag != null &amp;&amp; flag.equals("ROW")) {<br />   v = readExl(file, rowORcol, -1);<br />  } else if (flag != null &amp;&amp; flag.equals("COL")) {<br />   v = readExl(file, -1, rowORcol);<br />  } else {<br />   return null;<br />  }<br />  return v;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> public static Vector readFromExcel(File file, int rowORcol, String flag)<br />   throws Exception {<br />  Vector v = new Vector();<br />  if (!file.isFile()) {<br />   return null;<br />  }<br />  if (flag != null &amp;&amp; flag.equals("ROW")) {<br />   v = readExl(file, rowORcol, -1);<br />  } else if (flag != null &amp;&amp; flag.equals("COL")) {<br />   v = readExl(file, -1, rowORcol);<br />  } else {<br />   return null;<br />  }</font>
		</p>
		<p>
				<font face="Courier New">  return v;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 读取多行或者多列,可以任意挑选几行或几列<br />  * <br />  * @param fileName<br />  *        String 文件名<br />  * @param rowORcol<br />  *        int 任意的行或列<br />  * @param flag<br />  *        String ROW表示行COL表示列<br />  * @throws Exception<br />  * @return Vector<br />  */<br /> public static Vector readFromExcel(String fileName, int[] rowORcol,<br />   String flag) throws Exception {<br />  Vector v = new Vector();<br />  return v;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> public static Vector readFromExcel(File file, int[] rowORcol, String flag)<br />   throws Exception {<br />  Vector v = new Vector();<br />  return v;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 读取第几行第几列的一个数据<br />  * <br />  * @param fileName<br />  *            String<br />  * @param row<br />  *            int<br />  * @param col<br />  *            int<br />  * @throws Exception<br />  * @return String<br />  */<br /> public static String readFromExcel(String fileName, int row, int col)<br />   throws Exception {<br />  String res = null;<br />  File file = new File(fileName);<br />  if (!file.isFile()) {<br />   return null;<br />  }<br />  return res;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> public static String readFromExcel(File file, int row, int col)<br />   throws Exception {<br />  String res = null;<br />  if (!file.isFile()) {<br />   return null;<br />  }</font>
		</p>
		<p>
				<font face="Courier New">  return res;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 读取xls文件<br />  * <br />  * @param f<br />  *        File 文件<br />  * @param row<br />  *        int 读取从0到row行<br />  * @param col<br />  *        int 读取从0到col列<br />  * @throws Exception<br />  * @return Vector<br />  */</font>
		</p>
		<p>
				<font face="Courier New"> private static Vector readExl(File f, int row, int col) throws Exception {<br />  Vector v = new Vector();<br />  Workbook wb = null;<br />  Sheet st = null;<br />  wb = Workbook.getWorkbook(f);<br />  st = wb.getSheet(0);<br />  int allRow = st.getRows();<br />  if (row == -1) {<br />   row = allRow;<br />  }<br />  int allCol = st.getColumns();<br />  if (col == -1) {<br />   col = allCol;<br />  }<br />  for (int i = 0; i &lt; row; i++) {<br />   String sRow = null;<br />   for (int j = 0; j &lt; col; j++) {<br />    Cell c1 = st.getCell(j, i);<br />    String sCol = c1.getContents();<br />    if (j == 0) {<br />     sRow = sCol;<br />    } else {<br />     if (sCol != null) {<br />      sRow = sRow + "," + sCol;<br />     } else {<br />      sRow = sRow + "," + "";<br />     }<br />    }<br />    c1 = null;<br />    sCol = null;<br />   }<br />   v.addElement(sRow);<br />   sRow = null;<br />  }</font>
		</p>
		<p>
				<font face="Courier New">  st = null;<br />  wb.close();<br />  wb = null;<br />  return v;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> public void addSheet() throws Exception {<br />  addSheet(String.valueOf(sheetCount));<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> public void addSheet(String sheetName) throws Exception {</font>
		</p>
		<p>
				<font face="Courier New">  // 创建Excel工作表<br />  WritableSheet ws = wwb.createSheet(sheetName, sheetCount);<br />  vSheet.addElement(ws);<br />  sheetCount++;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 为工作表添加内容,指定添加到第几列<br />  * <br />  * @param v<br />  *        Vector 要添加到工作表的内容 格式<br />  *        String,String,String,String,...,...,...,..., 每列内容以逗号隔开<br />  * @param col<br />  *        int 指定列数<br />  * @throws Exception<br />  */<br /> public void addContent(Vector v, int col) throws Exception {<br />  WritableSheet ws = (WritableSheet) vSheet.get(sheetCount - 2);</font>
		</p>
		<p>
				<font face="Courier New">  int size = v.size();<br />  try {<br />   for (int i = 0; i &lt; size; i++) {<br />    String s = (String) v.get(i);<br />    String[] s1 = s.split(",");<br />    for (int j = 0; j &lt; col; j++) {<br />     Label label = new Label(j, i, s1[j]);</font>
		</p>
		<p>
				<font face="Courier New">     ws.addCell(label);<br />     label = null;<br />    }<br />   }<br />  } catch (ArrayIndexOutOfBoundsException e) {<br />   throw new ArrayIndexOutOfBoundsException("check column!");<br />  }<br />  ws = null;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 为工作表添加内容,不指定添加几列<br />  * <br />  * @param v<br />  *        Vector 要添加到工作表的内容 格式<br />  *        String,String,String,String,...,...,...,..., 每列内容以逗号隔开<br />  * @throws Exception<br />  */<br /> public void addContent(Vector v) throws Exception {<br />  WritableSheet ws = (WritableSheet) vSheet.get(sheetCount - 2);</font>
		</p>
		<p>
				<font face="Courier New">  int size = v.size();<br />  try {<br />   for (int i = 0; i &lt; size; i++) {<br />    String s = (String) v.get(i);<br />    String[] s1 = s.split(",");<br />    int col_size = s1.length;<br />    for (int j = 0; j &lt; col_size; j++) {<br />     Label label = new Label(j, i, s1[j]);</font>
		</p>
		<p>
				<font face="Courier New">     ws.addCell(label);<br />     label = null;<br />    }<br />   }<br />  } catch (Exception e) {<br />   throw new Exception();<br />  }<br />  ws = null;<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 为工作表添加内容,不指定添加几列<br />  * <br />  * @param rs<br />  *        ResultSet 从数据库中得到的结果集<br />  * @throws Exception<br />  */<br /> public void addContent(ResultSet rs) throws Exception {<br />  if (rs == null) {<br />   return;<br />  }<br />  WritableSheet ws = (WritableSheet) vSheet.get(sheetCount - 2);<br />  ResultSetMetaData rsMetaD = rs.getMetaData();<br />  int col = rsMetaD.getColumnCount();<br />  int i = 0;<br />  while (rs.next()) {<br />   for (int j = 0; j &lt; col; j++) {<br />    Label label = new Label(j, i, rs.getString(j));// Chinese.fromDatabase(rs.getString(j))<br />    ws.addCell(label);<br />    label = null;<br />   }<br />   i++;<br />  }<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> /**<br />  * 最终生成excel文件<br />  * <br />  * @throws Exception<br />  */<br /> public void createExcel() throws Exception {<br />  wwb.write();<br />  wwb.close();<br /> }</font>
		</p>
		<p>
				<font face="Courier New"> public static void main(String[] args) {<br />  Excel t = new Excel("d:\\test.xls");<br />  Vector v = new Vector();<br />  try {<br />   v.addElement("ding,wen,yuan");<br />   v.addElement("ding,wen,yuan");<br />   t.addSheet("first");<br />   t.addContent(v, 3);</font>
		</p>
		<p>
				<font face="Courier New">   v.clear();<br />   v.addElement("xuhy,hai,yong");<br />   v.addElement("xuhy,hai,yong");<br />   t.addSheet("second");<br />   t.addContent(v, 3);</font>
		</p>
		<p>
				<font face="Courier New">   v.clear();<br />   v.addElement("wu,jia,qian");<br />   v.addElement("wu,jia,qian");<br />   t.addSheet("third");<br />   t.addContent(v, 3);</font>
		</p>
		<p>
				<font face="Courier New">   t.createExcel();<br />  } catch (Exception e) {<br />   e.printStackTrace();<br />  }</font>
		</p>
		<p>
				<font face="Courier New"> }</font>
		</p>
		<p>
				<font face="Courier New">}<br /><br />转自:http://www.blogjava.net/wujiaqian/archive/2006/12/21/89308.html?Pending=true#Post</font>
		</p>
<img src ="http://www.blogjava.net/yongbing/aggbug/92382.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yongbing/" target="_blank">小石头</a> 2007-01-08 15:19 <a href="http://www.blogjava.net/yongbing/articles/92382.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>