java做excel导出,需要用到跨列,哪位懂,还请赐教。(合并表头单元格)

Row firstRow = sheet.createRow(0); //第一行

Row secondRow = sheet.createRow(1);         //第二行

Row thirdRow = sheet.createRow(2);      //第三行

    CellStyle style =wb.createCellStyle();
    Font f  = wb.createFont();      
  //  f.setFontHeightInPoints((short) 16);//字号      
    f.setFontHeightInPoints((short) 12);//字号
   // f.setBoldweight(HSSFFont.BOLDWEIGHT_NORMAL);//加粗      
    f.setBoldweight(HSSFFont.BOLDWEIGHT_NORMAL);

    style.setFont(f);      
    style.setAlignment(HSSFCellStyle.ALIGN_CENTER);//左右居中      
    style.setBorderBottom(HSSFCellStyle.BORDER_THIN);//下边框    
    style.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框
    style.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框       
    style.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框     

http://piranha.iteye.com/blog/829574
看看这个?
我只做过导出,没用过跨列

http://blog.csdn.net/boybruce/article/details/17094233
我转的这篇文章满足你的需求,我实际测试过,ok的,源码也有提供下载,去看看吧

加一列空字符串试试看

你说的跨列是合并单元格吗?你的需求是什么?
可以私信我,我熟悉POI操作,可以帮忙看看。

参考:http://www.xuebuyuan.com/790737.html
http://blog.csdn.net/boybruce/article/details/17094233

我精通各种POI操作office 文档,各种导入导出,组装数据,生成报表,配合hightchart,echarts等生成图表,你有什么问题可以咨询我

尝试用jxl或poi自带的一些功能做;这两个技术的参考文章:
http://blog.csdn.net/tianyazaiheruan/article/details/9818391
http://blog.csdn.net/tianyazaiheruan/article/details/12555395