本文实例为大家分享了java使用poi导出Excel的具体代码,供大家参考,具体内容如下
packagehyss.util.common;
importjava.io.IOException;
importjava.io.OutputStream;
importjava.net.URLEncoder;
importjava.util.ArrayList;
importjava.util.List;
importorg.apache.poi.hssf.usermodel.HSSFCell;
importorg.apache.poi.hssf.usermodel.HSSFCellStyle;
importorg.apache.poi.hssf.usermodel.HSSFFont;
importorg.apache.poi.hssf.usermodel.HSSFRichTextString;
importorg.apache.poi.hssf.usermodel.HSSFRow;
importorg.apache.poi.hssf.usermodel.HSSFSheet;
importorg.apache.poi.hssf.usermodel.HSSFWorkbook;
importorg.apache.poi.hssf.util.HSSFColor;
importorg.apache.poi.ss.util.CellRangeAddress;
/**
*Excel导出工具类
*@authorts
*/
publicclassExportExcelUtil{
//显示的导出表的标题
privateStringtitle;
//导出表的列名
privateString[]rowName;
privateList