POI中的jar包都是干嘛的 我该导哪个?

yutaoshen 2012-10-09 11:42:08
下了个POI3.8
里面有几个jar包 都是干嘛的,
poi-3.8-20120326.jar
poi-examples-3.8-20120326.jar
poi-excelant-3.8-20120326.jar
poi-ooxml-3.8-20120326.jar
poi-ooxml-schemas-3.8-20120326.jar
poi-scratchpad-3.8-20120326.jar
读取Excel2003 2007 2010希望都能兼容的话 该怎么做
...全文
4470 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
fanxin90 2012-10-29
  • 打赏
  • 举报
回复
不知道在哪下啊?poi-examples-3.8-beta.jar
poi-excelant-3.8-beta3.jar
poi-scratchpad-3.8-beta3.jar
cuiyf2004 2012-10-09
  • 打赏
  • 举报
回复
一般第一个就好了
风行傲天 2012-10-09
  • 打赏
  • 举报
回复
poi-excelant-3.8-20120326.jar

xmlbeans-2.3.0.jar

stax-api-1.0.1.jar

dom4j-1.6.1.jar

poi-3.8-20120326.jar

poi-ooxml-3.8-20120326.jar

poi-ooxml-schemas-3.8-20120326.jar





import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

/**
* 用于生产excel文件xlsx
*
* @author
*/
public class TestExcel
{
public void createExcel()
{
Workbook workBook = null;
FileOutputStream output = null;
Row row = null;
Cell cell = null;
try
{
output = new FileOutputStream(
"C:/Documents and Settings/kou/桌面/导出.xlsx");
// 创建一个工作簿

//生成xlsx
workBook = new XSSFWorkbook();

//生成xls

// workBook = new XSSFWorkbook();
//创建工作表
Sheet sheet = workBook.createSheet("haha");
int rowNum=10;
//循环创建行数
for (int i = 0; i < rowNum; i++)
{ //创建一行
row = sheet.createRow(i);
int cellNum=10;
//循环创建单元格
for (int j = 0; j < cellNum; j++)
{
cell = row.createCell(j);
//给单元格设值
cell.setCellValue(i+""+j);
}
}
//将内容写入Excel
workBook.write(output);
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
try
{
output.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}

}

public static void main(String[] args)
{
new TestExcel().createExcel();
}

}
lzh_me 2012-10-09
  • 打赏
  • 举报
回复
好久没用了,记得之前的版本就导入一个就够了。
看下官网的文档,就是你下载的页面那个列表,有说明的。

67,550

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧