public class CopyExcelSheetToAnotherExcelSheet {
public static void main(String[] args) throws FileNotFoundException, IOException {
String fromPath = "D:\\share\\jiemu_new\\";// excel存放路径
String toPath = "c:\\ok\\";// 保存新EXCEL路径
// 新的excel 文件名
String excelName = "节目访问量";
// 创建新的excel
HSSFWorkbook wbCreat = new HSSFWorkbook();
File file = new File(fromPath);
for (File excel : file.listFiles()) {
// 打开已有的excel
String strExcelPath = fromPath + "\\" + excel.getName();
InputStream in = new FileInputStream(strExcelPath);
HSSFWorkbook wb = new HSSFWorkbook(in);
for (int ii = 0; ii < wb.getNumberOfSheets(); ii++) {
HSSFSheet sheet = wb.getSheetAt(ii);
HSSFSheet sheetCreat = wbCreat.createSheet