java excel导出选择路径,poi导出excel的时候怎么让他选择导出路径_选中复选框

poi 怎样读取Excel中的复选框的值???

public List read(String fileName)

{

List dataLst = new ArrayList();

/** *//** 检查文件名是否为空或否是Excel格式的 */

if (fileName == null || !fileName.matches("^. \\.(?i)((xls)|(xlsx))$"))

{

return dataLst;

}

boolean isExcel2003 = true;

/** *//** 件的合法性进行验证 */

if (fileName.matches("^. \\.(?i)(xlsx)$"))

{

isExcel2003 = false;

}

/** *//** 检查文件是否存在 */

File file = new File(fileName);

if (file == null || !file.exists())

{

return dataLst;

}

try

{

/** *//** 调用本类提供的根据流读取的方法 */

dataLst = read(new FileInputStream(file), isExcel2003);

}

catch (Exception ex)

{

ex.printStackTrace();

}

/** *//** 返回最后读取的结果 */

return dataLst;

}

java用POI操作Excel时当遍历单元格时如何获取当前单元个的具体坐标

先根据sheet找到行

row = sheet.getRow(rowIndex);

cell = row.getCell(1);

这样就去到当前的B1了,

cell.getStringCellValue()

就能取到的格的value

poi导出excel的时候怎么让他选择导出路径

点的时候,把所需要的数据传出界面JSP,这是我自接的,代码如下

String path = request.getContextPath();

String xlsname = request.getAttribute("xlsname").toString();

String fileName = xlsname ".xls";

byte[] yte = fileName.getBytes("GB2312");

String unicoStr = new String(yte, "ISO-8859-1");

response.setHeader("Content-disposition","attachment;filename=" unicoStr);

%>

#tableinfo tr td{

text-align: center;font-size: 13px;border: 1px solid #64ABD6;

}

#tableinfo{width: 100%;border-collapse: collapse;height: 30px;line-height: 30px;}

用户名:

分厂:

住宅区:

楼层:

具体住址:

上次度数:

本次度数:

操作时间:

List list = (List)request.getAttribute("list");

if(list!=null

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值