当前位置: 首页 > news >正文

游戏币网站怎么做网站导航颜色

游戏币网站怎么做,网站导航颜色,文创产品设计包括哪些方面,容桂网站智能推广新闻Excel导出这里不讲#xff0c;方法很多#xff0c;原生的POI可以参照 Java原生POI实现的Excel导入导出#xff08;简单易懂#xff09; 这里只说怎么给Excel每一列设置不同的样式#xff0c;比如下面这样的 直接上代码 Overridepublic void exportTemplate(HttpServletRe…Excel导出这里不讲方法很多原生的POI可以参照 Java原生POI实现的Excel导入导出简单易懂 这里只说怎么给Excel每一列设置不同的样式比如下面这样的 直接上代码 Overridepublic void exportTemplate(HttpServletRequest request, HttpServletResponse response) throws Exception {try (Workbook wb new SXSSFWorkbook(1000)) {// 构建一个导出页Sheet sheet wb.createSheet(用户信息表);CellStyle style wb.createCellStyle();style.setAlignment(HorizontalAlignment.CENTER);style.setVerticalAlignment(VerticalAlignment.CENTER);style.setBorderBottom(BorderStyle.THIN);style.setBorderLeft(BorderStyle.THIN);style.setBorderTop(BorderStyle.THIN);style.setBorderRight(BorderStyle.THIN);style.setWrapText(true);// 自动换行Font font wb.createFont();font.setFontName(宋体);font.setFontHeightInPoints((short) 11);style.setFont(font);DataFormat format wb.createDataFormat();style.setDataFormat(format.getFormat()); // 设置为文本格式sheet.setDefaultRowHeight((short) 500);// 构建excel抬头Row row0 sheet.createRow((int) 0); // 第一行Cell cell0_0 row0.createCell(0);cell0_0.setCellValue(序号);cell0_0.setCellStyle(style);sheet.setColumnWidth(0, 15 * 256);// 列宽sheet.setDefaultColumnStyle(0, style);Cell cell0_1 row0.createCell(1);cell0_1.setCellValue(姓名);cell0_1.setCellStyle(style);sheet.setColumnWidth(1, 15 * 256);// 列宽sheet.setDefaultColumnStyle(1, style);Cell cell0_2 row0.createCell(2);cell0_2.setCellValue(国家标识码);cell0_2.setCellStyle(style);sheet.setColumnWidth(2, 15 * 256);// 列宽sheet.setDefaultColumnStyle(2, style);Cell cell0_3 row0.createCell(3);cell0_3.setCellValue(手机号);cell0_3.setCellStyle(style);sheet.setColumnWidth(3, 15 * 256);// 列宽sheet.setDefaultColumnStyle(3, style);Cell cell0_4 row0.createCell(4);cell0_4.setCellValue(身份证号);cell0_4.setCellStyle(style);sheet.setColumnWidth(4, 20 * 256);// 列宽sheet.setDefaultColumnStyle(4, style);Cell cell0_5 row0.createCell(5);cell0_5.setCellValue(部门名称选填);cell0_5.setCellStyle(style);sheet.setColumnWidth(5, 20 * 256);// 列宽sheet.setDefaultColumnStyle(5, style);Cell cell0_6 row0.createCell(6);cell0_6.setCellValue(职位选填多个用英文/分隔);cell0_6.setCellStyle(style);sheet.setColumnWidth(6, 35 * 256);// 列宽sheet.setDefaultColumnStyle(6, style);// 构建示例Row row1 sheet.createRow((int) 1); // 第二行CellStyle style1 wb.createCellStyle();style1.setAlignment(HorizontalAlignment.CENTER);style1.setVerticalAlignment(VerticalAlignment.CENTER);style1.setBorderBottom(BorderStyle.THIN);style1.setBorderLeft(BorderStyle.THIN);style1.setBorderTop(BorderStyle.THIN);style1.setBorderRight(BorderStyle.THIN);style1.setWrapText(true);// 自动换行style1.setFont(font);DataFormat format1 wb.createDataFormat();style1.setDataFormat(format1.getFormat()); // 设置为文本格式style1.setFillForegroundColor((short) 13);// 设置背景色style1.setFillPattern(FillPatternType.SOLID_FOREGROUND);Cell cell1_0 row1.createCell(0);cell1_0.setCellValue(示例保留);cell1_0.setCellStyle(style1);Cell cell1_1 row1.createCell(1);cell1_1.setCellValue(张三);cell1_1.setCellStyle(style1);Cell cell1_2 row1.createCell(2);cell1_2.setCellValue(86);cell1_2.setCellStyle(style1);Cell cell1_3 row1.createCell(3);cell1_3.setCellValue(13700002222);cell1_3.setCellStyle(style1);Cell cell1_4 row1.createCell(4);cell1_4.setCellValue(452186200001010001);cell1_4.setCellStyle(style1);Cell cell1_5 row1.createCell(5);cell1_5.setCellValue(技术部);cell1_5.setCellStyle(style1);Cell cell1_6 row1.createCell(6);cell1_6.setCellValue(科室主任/细胞生物学家/博士生导师);cell1_6.setCellStyle(style1);// 构建第二列Row row2 sheet.createRow((int) 2); // 第一行Cell cell2_0 row2.createCell(0);cell2_0.setCellValue(1);cell2_0.setCellStyle(style);Cell cell2_1 row2.createCell(1);cell2_1.setCellValue();cell2_1.setCellStyle(style);Cell cell2_2 row2.createCell(2);cell2_2.setCellValue();cell2_2.setCellStyle(style);Cell cell2_3 row2.createCell(3);cell2_3.setCellValue();cell2_3.setCellStyle(style);Cell cell2_4 row2.createCell(4);cell2_4.setCellValue();cell2_4.setCellStyle(style);Cell cell2_5 row2.createCell(5);cell2_5.setCellValue();cell2_5.setCellStyle(style);Cell cell2_6 row2.createCell(6);cell2_6.setCellValue();cell2_6.setCellStyle(style);String fileName 用户信息表.xlsx;if (request.getHeader(User-Agent).toLowerCase().indexOf(firefox) 0) {fileName new String(fileName.getBytes(UTF-8), ISO8859-1); // firefox浏览器} else if (request.getHeader(User-Agent).toUpperCase().indexOf(MSIE) 0) {fileName URLEncoder.encode(fileName, UTF-8);// IE浏览器} else if (request.getHeader(User-Agent).toUpperCase().indexOf(CHROME) 0) {fileName new String(fileName.getBytes(UTF-8), ISO8859-1);// 谷歌}response.reset();response.setContentType(application/vnd.openxmlformats-officedocument.spreadsheetml.sheet); response.setHeader(Content-Disposition, attachment; filename fileName);wb.write(response.getOutputStream());response.getOutputStream().close();}}
http://www.w-s-a.com/news/267358/

相关文章:

  • 福州网站建设团队淘宝联盟网站怎么建设
  • 福州企业网站建站模板国内黑色风格的网站
  • 好看的网站首页设计android移动开发
  • 域名注册完成后如何做网站域名 删除 wordpress
  • wordpress xml导入大小东莞seo优化方案
  • 网站建设效益网站销售怎么做的
  • 利用网站空间做代理设计方案的格式范文
  • 无锡建设工程质量监督网站遵义做手机网站建设
  • 衡阳商城网站制作ps做网站首页规范尺寸
  • 微信网站应用开发营销推广的方案
  • 广州做网站商城的公司制作一个app的完整流程
  • 湖南城乡建设厅网站163注册企业邮箱
  • 做网站怎么调整图片间距织梦做的网站如何去掉index
  • 凡科网免费建站步骤及视频网页设计基础教程第二版课后答案
  • 建设一个旅游网站毕业设计企业网站要更新文章吗
  • 做网站需要简介中山网站设计公司
  • 网站怎么做导航栏微信公众号官网登录
  • 1_ 掌握网站开发的基本流程 要求:熟悉网站开发与设计的基本流程.电子商城网站开发
  • 百度网站怎么建设河北省工程造价信息网官网
  • 阿里云网站模板网页设计的合适尺寸是多少
  • 做小程序和做网站哪个好让别人做网站推广需要多少钱
  • 做外贸的几个网站查询网域名解析
  • 酒泉如何做百度的网站seo研究中心好客站
  • 网站设计建设平台户县做网站
  • 一元云购网站开发wordpress博客空间
  • 深圳高端网站建设公司排名如何搭建局域网服务器
  • 照片管理网站模板高端网站开发哪家好
  • 黄冈网站制作wordpress为什么不能显示域名
  • 做网站设计怎么进企业电子商务网站建设与管理教材
  • 设计广告公司网站建设网站开发技术选择