作者:乔山办公网日期:
返回目录:excel表格制作
详细点~~~贴代码 亲~
如果建百有模板,可以度直接在模板里设文本格式版
指定写入Excel为文权本 : Response.Write(styleText);
e.Row.Cells[9].Attributes.Add("class", "text");
参考来代码自 public static void createColHeader(HSSFSheet sheet, CellStyle cellStyle,String[] columHeader) {if (sheet !zd= null) { sheet.setDefaultColumnWidth(20); HSSFRow row = sheet.createRow(0); for (int i = 0; i < columHeader.length; i++) { HSSFCell cell = row.createCell(i); cell.setCellValue(columHeader[i]); if (cellStyle != null) { cell.setCellStyle(cellStyle); } } freezePane(sheet,0,1,0,1); }}