如题,中文版的

解决方案 »

  1.   

    中文版貌似没有的吧,你去官网下载poi-bin-3.6-20091214,里面包含api
      

  2.   

    给你一个简单点的例子。。
    HSSFWorkbook workBook = new HSSFWorkbook();
    HSSFSheet sheet = workBook.createSheet("工作表");
    sheet.setColumnWidth((short)0, (short)2000);
    sheet.autoSizeColumn((short)1);
    sheet.setColumnWidth((short)2, (short)5000); for(int i = 0;i < 23;i++)
    {
    HSSFRow row = sheet.createRow(i);
    HSSFCell cell1 = row.createCell((short)0);
    cell1.setCellValue(i);

    HSSFCell cell2 = row.createCell((short)1);
    cell2.setCellValue("xxx");

    HSSFCell cell3 = row.createCell((short)2);
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    cell3.setCellValue(sdf.format(new java.util.Date()));

    HSSFCell cell4 = row.createCell((short)3);
    cell4.setCellValue(2323.52345235);

    sheet.addMergedRegion(new Region((short)i,(short)3,(short)i,(short)4));
    }
    FileOutputStream fos = new FileOutputStream("e:\\abc.xls");
    workBook.write(fos);
    fos.close();