jxl (jexcelapi) 一直是我比较喜欢的 java版excel读写组件.
主页
http://www.andykhan.com/jexcelapi/index.html
网上关于 jxl使用的文章 太多太多 我就不再重复jxl的用法了.
决定写这篇文章 有点偶然:
刚刚 我用"setUseTemporaryFileDuringWrite" 做关键字,去google里面搜索,
想看看有没有这个的更多技巧(实在没有功夫去看jxl的源码)
google之后, 居然没有一条 中文的 结果.
这也许说明国内还没有一篇文章 来介绍 jxl 的setUseTemporaryFileDuringWrite 相关内容吧.
那我就来啰嗦两句吧, 这个也不是啥高深技术, 算作一个小知识点吧.
大家可以参见 jxl 的 changehistory : ( 写本文时最新版本是 2.6.9 for jdk 1.4)
引用
Version 2.6.5 (Sept 2007)
Fixed a bug to allow more than one conditional format per cell
Adjusted the cells referenced by named blocks when inserting and deleting rows
Added a synchronised block when initialising the workbook to prevent race conditions in multi-threaded environments
Migrated formula parsing to the JFlex (rather than JLex) for performance reasons. This is a GPL product - see notice on main page of the website
When writing out a file, it is now possible to write out a temporary file, rather than generate the whole thing in memory. This feature is accessible via the WorkboodSettings bean (useTemporaryFileDuringWrite) or the system property jxl.usetemporaryfileduringwrite
Set the atan function to have two arguments
Supported the copying of WritableSheets within a Workbook, as well as read only ones (this was throwing a ClassCastException)
Lists in drop downs can only be a maximum of 256 characters. If this length is exceeded truncated the string and presented a warning
Added a non-documented workaround in order to resolve a bug in some version of the JVM not recognising the character encoding "UnicodeLittle"
看 红色字部分. 这个特性真的很不错, 但是jxl官方没有提供示例,
大家看一下 我下面的这个代码片段吧
(什么是Workbook 以及 如何创建一个excel文件 我就不说了 )
WorkbookSettings settings=new WorkbookSettings ();
settings.setUseTemporaryFileDuringWrite(true);
WritableWorkbook workbook = Workbook.createWorkbook(outputStream, settings);
很简单.
当按示例中的写法 开启 UseTemporaryFileDuringWrite 后,
jxl在生成excel文件时 所支持的单个文件记录数 确实提高很多.
我这边的测试结果是 开启功能比不开启 多支持了 10000 余行.
(当然 这和列数 以及每列的内容也有关. 而且开启后速度略慢 )
===========================
简单的小知识点 没啥好说的了 . 希望对大家有所帮助.
over
分享到:
相关推荐
jexcelapi的API jxl的API 源码
jxl数据导入导出jxl数据导入导出jxl数据导入导出 jxl数据导入导出jxl数据导入导出jxl数据导入导出
jxl(jExcelAPI)的基本使用方法
NULL 博文链接:https://cuics-100.iteye.com/blog/986408
压缩包中的工程可导入eclipse中,然后引入jxl.jar后运行 博文链接:https://coderdream.iteye.com/blog/250628
jexcelapi_2_4, JXL的API, JXL是JAVA读取EXCEL的开源项目
jxl java excel export jxl数据导出,完整代码附带jar
jxl支持jdk1.6!jxl/js源码!
最近刚好用到jxl来读取Excel表格数据,百度上找遍都找不到jxl的jar包,最后通过其他途径找到了,所以分享一下,让接下来的同学不要费劲找jar包了。
jxl.jar,excel数据工具类导出jar。用于对数据的导出。工具类地址 :https://mp.csdn.net/postedit/83502664
JS jxl支持jdk1.5!js源码!
jxl是一个韩国人写的java操作excel的工具, 在java的开源世界中,有两套比较有影响的API可供使用,一个是POI,一个是jExcelAPI(即jxl)。jxl功能相对POI比较弱一点。 但jExcelAPI对中文支持非常好,API是纯Java的, ...
最新jxl jexcelapi_2_6_9_1.4 2008-11-25
一款让你轻松生成、读取、修改excel的jar.
java JXL导出Excel源码及jfreechart 生成折线图,饼图 java JXL导出Excel源码及jfreechart 生成折线图,饼图 java JXL导出Excel源码及jfreechart 生成折线图,饼图
包括POI和JXL两种方法读取EXCEL数据的工具类(传入文件或者文件路径直接调用)以及所需要的jar包
NULL 博文链接:https://huhongyu.iteye.com/blog/1844333
用jxl读写excel数据,输出图片到excel
利用JXL技术支持模板和非模板的表格导出
JXL教程 JXL开发文档 JXL学习笔记 JXL示例。