/**
* 导出Excel表格
*
* @param allList 要导出的数据
* @param headArr json键值对
* @param titleArr excel标题
* @param title Excel名字
* @param mergeColumn 要合并的列
*/
public void exportExcel(JSONArray allList, String[] headArr, String title, String[] titleArr,int[] mergeColumn, HttpServletResponse response) {
try {
//通过Response把数据以Excel格式保存
response.reset();
response.setContentType("application/msexcel;charset=UTF-8");
response.addHeader("Content-Disposition", "attachment;filename=\""
+ new String((title + ".xls").getBytes("GBK"),
"ISO8859_1") + "\"");
OutputStream out = response.getOutputStream();
WritableWorkbook workbook = Workbook.createWorkbook(out);
WritableSheet she