Excel,在复制Sheet页的某个单元格到本sheet页某个位置
例子
sheet3 = wb.getSheetAt(2);
cell =checkCell(sheet3, 8, 1);//(页,行,列)
cell.setCellValue("这里填写你要的内容");
cell.setCellStyle(oldCell(sheet3, 2, 1));
//把3页2行1列的样式复制到3页8行1列
/**
* Excel添加标识
* @param sheet 页
* @param hs 行
* @param ls 列
* @return
* */
public Cell checkCell(Sheet sheet, int hs, int ls){
Row row = sheet.getRow(hs);
if(row == null){
row = sheet.createRow(hs);// 行createRow
}
Cell cell = row.getCell(ls);
if (cell == null) {
cell = row.createCell(ls);
}
return cell;
}