controller层方法:
/**
*
* 导出Excel报表
* @param request
* @return
*
*/
@RequestMapping("/export")
@ResponseBody
public void export(HttpServletRequest request,
HttpServletResponse response, String yearMonth) {
try {
SimpleDateFormat dateFmt = new SimpleDateFormat("yyyy-MM-dd");
Map<String, Object> params = new HashMap<String, Object>();
params.put("yearMonth", yearMonth + "%");
List<TemperHumidityModel> list = temperHumidityService
.getList(params);
for (int i = 0; i < list.size(); i++) {
Date date = list.get(i).getRecordDate();
String dateStr = dateFmt.format(date);
dateStr = dateStr.replace(yearMonth + "-", "");
list.get(i).setRecordDay(dateStr);
}
Map<Integer, String> map = new HashMap<Integer, String>();
map.put(1, "晴");
map.put(2, "多云");
map.put(3, "阴");
map.put(4, "小雨");
map.put(5, "中雨");
map.put(6, "大雨");
map.put(7, "大到暴雨");
map.put(8, "雾");
map.put(9, "霾");
// 构造导出数据
List<Map<String, Object>> dataList = new ArrayList<Map<String, Object>>();
for (int i = 0; i < list.size(); i++) {
TemperHumidityModel model = list.get(i);
Map<String, Object> tmpMap = new HashMap<String, Object>();
tmpMap.put("date", model.getRecordDay());
if(model.getWeather() == 1) {
tmpMap.put("weather", map.get(1));
}else if(model.getWeather() == 2) {
tmpMap.put("weather", map.get(2));
}else if(model.getWeather() == 3) {
tmpMap.put("weather", map.get(3));
}else if(model.getWeather() == 4) {
tmpMap.put("weather", map.get(4));
}else if(model.getWeather() == 5) {
tmpMap.put("weather", map.get(5));
}else if(model.getWeather() == 6) {
tmpMap.put("weather", map.get(6));
}else if(model.getWeather() == 7) {
tmpMap.put("weather", map.get(7));
}else if(model.getWeather() == 8) {
tmpMap.put("weather", map.get(8));
}else if(model.getWeather() == 9) {
tmpMap.put("weather", map.get(9));
}
tmpMap.put("natureTem", model.getNatureTem());
tmpMap.put("natureHum", model.getNatureHum());
tmpMap.put("adjustTem", model.getAdjustTem());
tmpMap.put("adjustHum", model.getAdjustHum());
tmpMap.put("remark", model.getRemark());
tmpMap.put("creator", model.getRealname());
dataList.add(tmpMap);
}
String sheetName = "温湿度日记录";
String date = yearMonth;
String[] head0 = new String[] { "日期", "天气", "自然", "自然", "调整", "调整",
"备注", "记录人" }; //在excel中的第3行每列的参数
String[] head1 = new String[] { "温度℃", "湿度%", "温度℃", "湿度%" }; //在excel中的第4行每列(合并列)的参数
String[] headnum0 = new String[] { "2,3,0,0", "2,3,1,1", "2,2,2,3",
"2,2,4,5", "2,3,6,6", "2,3,7,7" }; //对应excel中的行和列,下表从0开始{"开始行,结束行,开始列,结束列"}
String[] headnum1 = new String[] { "3,3,2,2", "3,3,3,3", "3,3,4,4",
"3,3,5,5" };
String[] colName = new String[] { "date", "weather", "natureTem",
"natureHum", "adjustTem", "adjustHum", "remark", "creator" }; //需要显示在excel中的参数对应的值,因为是用map存的,放的都是对应的key
reportMergeXls(request, response, dataList, sheetName, head0,
headnum0, head1, headnum1, colName, date); //utils类需要用到的参数
} catch (Exception e) {
e.printStackTrace();
}
}
utils类:
package org.base.controller;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.CellRangeAddress;
import org.base.util.CellUtil;
import org.core.controller.BaseController;
/**
* 多行表头
* dataList:导出的数据;sheetName:表头名称; head0:表头第一行列名;headnum0:第一行合并单元格的参数
* head1:表头第二行列名;headnum1:第二行合并单元格的参数;detail:导出的表体字段
*
*/
public void reportMergeXls(HttpServletRequest request,
HttpServletResponse response, List<Map<String, Object>> dataList,
String sheetName, String[] head0, String[] headnum0,
String[] head1, String[] headnum1, String[] detail , String date)
throws Exception {
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet(sheetName);// 创建一个表
// 表头标题样式
HSSFFont headfont = workbook.createFont();
headfont.setFontName("宋体");
headfont.setFontHeightInPoints((short) 22);// 字体大小
HSSFCellStyle headstyle = workbook.createCellStyle();
headstyle.setFont(headfont);
headstyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);// 左右居中
headstyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);// 上下居中
headstyle.setLocked(true);
// 表头时间样式
HSSFFont datefont = workbook.createFont();
datefont.setFontName("宋体");
datefont.setFontHeightInPoints((short) 12);// 字体大小
HSSFCellStyle datestyle = workbook.createCellStyle();
datestyle.setFont(datefont);
datestyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);// 左右居中
datestyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);// 上下居中
datestyle.setLocked(true);
// 列名样式
HSSFFont font = workbook.createFont();
font.setFontName("宋体");
font.setFontHeightInPoints((short) 12);// 字体大小
HSSFCellStyle style = workbook.createCellStyle();
style.setBorderBottom(HSSFCellStyle.BORDER_THIN); //下边框
style.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框
style.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框
style.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框
style.setFont(font);
style.setAlignment(HSSFCellStyle.ALIGN_CENTER);// 左右居中
style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);// 上下居中
style.setLocked(true);
// 普通单元格样式(中文)
HSSFFont font2 = workbook.createFont();
font2.setFontName("宋体");
font2.setFontHeightInPoints((short) 12);
HSSFCellStyle style2 = workbook.createCellStyle();
style2.setBorderBottom(HSSFCellStyle.BORDER_THIN); //下边框
style2.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框
style2.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框
style2.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框
style2.setFont(font2);
style2.setAlignment(HSSFCellStyle.ALIGN_CENTER);// 左右居中
style2.setWrapText(true); // 换行
style2.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);// 上下居中
// 设置列宽 (第几列,宽度)
sheet.setColumnWidth( 0, 1600);
sheet.setColumnWidth( 1, 3600);
sheet.setColumnWidth( 2, 2800);
sheet.setColumnWidth( 3, 2800);
sheet.setColumnWidth( 4, 2800);
sheet.setColumnWidth( 5, 2800);
sheet.setColumnWidth( 6, 4500);
sheet.setColumnWidth( 7, 3600);
sheet.setDefaultRowHeight((short)360);//设置行高
// 第一行表头标题
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, head0.length-1));
HSSFRow row = sheet.createRow(0);
row.setHeight((short) 0x349);
HSSFCell cell = row.createCell(0);
cell.setCellStyle(headstyle);
CellUtil.setCellValue(cell, sheetName);
// 第二行时间
sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, head0.length-1));
HSSFRow row1 = sheet.createRow(1);
row.setHeight((short) 0x349);
HSSFCell cell1 = row1.createCell(0);
cell1.setCellStyle(datestyle);
CellUtil.setCellValue(cell1, date);
// 第三行表头列名
row = sheet.createRow(2);
for (int i = 0; i < 8; i++) {
cell = row.createCell(i);
cell.setCellValue(head0[i]);
cell.setCellStyle(style);
}
//动态合并单元格
for (int i = 0; i < headnum0.length; i++) {
String[] temp = headnum0[i].split(",");
Integer startrow = Integer.parseInt(temp[0]);
Integer overrow = Integer.parseInt(temp[1]);
Integer startcol = Integer.parseInt(temp[2]);
Integer overcol = Integer.parseInt(temp[3]);
sheet.addMergedRegion(new CellRangeAddress(startrow, overrow,
startcol, overcol));
}
//设置合并单元格的参数并初始化带边框的表头(这样做可以避免因为合并单元格后有的单元格的边框显示不出来)
row = sheet.createRow(3); //因为下标从0开始,所以这里表示的是excel中的第四行
for (int i = 0; i < head0.length; i++) {
cell = row.createCell(i);
cell.setCellStyle(style); //设置excel中第四行的1、2、7、8列的边框
if(i > 1 && i< 6) {
for (int j = 0; j < head1.length; j++) {
cell = row.createCell(j + 2);
cell.setCellValue(head1[j]); //给excel中第四行的3、4、5、6列赋值("温度℃", "湿度%", "温度℃", "湿度%")
cell.setCellStyle(style); //设置excel中第四行的3、4、5、6列的边框
}
}
}
//动态合并单元格
for (int i = 0; i < headnum1.length; i++) {
String[] temp = headnum1[i].split(",");
Integer startrow = Integer.parseInt(temp[0]);
Integer overrow = Integer.parseInt(temp[1]);
Integer startcol = Integer.parseInt(temp[2]);
Integer overcol = Integer.parseInt(temp[3]);
sheet.addMergedRegion(new CellRangeAddress(startrow, overrow,
startcol, overcol));
}
// 设置列值-内容
for (int i = 0; i < dataList.size(); i++) {
row = sheet.createRow(i + 2 + dataList.size());
for (int j = 0; j < detail.length; j++) {
Map tempmap = (HashMap) dataList.get(i);
Object data = tempmap.get(detail[j]);
cell = row.createCell(j);
cell.setCellStyle(style2);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
CellUtil.setCellValue(cell, data);
}
}
String fileName = new String(sheetName.getBytes("gb2312"), "ISO8859-1");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
workbook.write(baos);
response.setContentType("application/x-download;charset=utf-8");
response.addHeader("Content-Disposition", "attachment;filename="
+ fileName + ".xls");
OutputStream os = response.getOutputStream();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
byte[] b = new byte[1024];
while ((bais.read(b)) > 0) {
os.write(b);
}
bais.close();
os.flush();
os.close();
}
CellUtil类:
package org.base.util;
import java.math.BigDecimal;
import java.sql.Date;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.regex.Pattern;
import org.apache.poi.hssf.usermodel.HSSFCell;
public class CellUtil {
public static String returnCellValue(HSSFCell cell){
String cellvalue = "";
if (null != cell) {
switch (cell.getCellType()) {
case HSSFCell.CELL_TYPE_NUMERIC: // 数字
return String.valueOf(cell.getNumericCellValue()).trim();
case HSSFCell.CELL_TYPE_STRING: // 字符串
return String.valueOf(cell.getStringCellValue()).trim();
case HSSFCell.CELL_TYPE_BOOLEAN: // Boolean
return String.valueOf(cell.getBooleanCellValue()).trim();
case HSSFCell.CELL_TYPE_FORMULA: // 公式
return String.valueOf(cell.getCellFormula()).trim();
case HSSFCell.CELL_TYPE_BLANK: // 空值
return "";
case HSSFCell.CELL_TYPE_ERROR: // 故障
return "";
default:
return "";
}
} else {
}
return cellvalue;
}
//避免cell.setCellValue(checkOrderQmSave.getSellOrderNo())中参数为空就会报错
public static void setCellValue(HSSFCell cell, Object object){
if(object == null){
cell.setCellValue("");
}else{
if (object instanceof String) {
cell.setCellValue(String.valueOf(object));
}else if(object instanceof Long){
Long temp = (Long)object;
String cellvalue = new DecimalFormat("#0.00").format(temp.doubleValue());
cell.setCellValue(cellvalue);
}else if(object instanceof Double){
Double temp = (Double)object;
String cellvalue = new DecimalFormat("#0.00").format(temp.doubleValue());
cell.setCellValue(cellvalue);
}else if(object instanceof Float){
Float temp = (Float)object;
String cellvalue = new DecimalFormat("#0.00").format(temp.doubleValue());
cell.setCellValue(cellvalue);
}else if(object instanceof Integer){
Integer temp = (Integer)object;
cell.setCellValue(temp.intValue());
}else if(object instanceof BigDecimal){
BigDecimal temp = (BigDecimal)object;
String cellvalue = new DecimalFormat("#0.00").format(temp.doubleValue());
cell.setCellValue(cellvalue);
}else{
cell.setCellValue("");
}
}
}
public static void setCellValue(HSSFCell cell, Object object, String model){
if(object == null){
cell.setCellValue("");
}else{
if (object instanceof String) {
cell.setCellValue(String.valueOf(object));
}else if(object instanceof Long){
Long temp = (Long)object;
String cellvalue = new DecimalFormat("#0.00").format(temp.doubleValue());
cell.setCellValue(cellvalue);
}else if(object instanceof Double){
Double temp = (Double)object;
String cellvalue = new DecimalFormat("#0.00").format(temp.doubleValue());
cell.setCellValue(cellvalue);
}else if(object instanceof Float){
Float temp = (Float)object;
String cellvalue = new DecimalFormat("#0.00").format(temp.doubleValue());
cell.setCellValue(cellvalue);
}else if(object instanceof Integer){
Integer temp = (Integer)object;
cell.setCellValue(temp.intValue());
}else if(object instanceof BigDecimal){
BigDecimal temp = (BigDecimal)object;
String cellvalue = new DecimalFormat("#0.00").format(temp.doubleValue());
cell.setCellValue(cellvalue);
}else if(object instanceof java.sql.Date){
cell.setCellValue(new SimpleDateFormat(model).format(object));
}else if(object instanceof java.util.Date){
cell.setCellValue(new SimpleDateFormat(model).format(object));
}else{
cell.setCellValue("");
}
}
}
public static void setCellValue(HSSFCell cell, String object){
if(object == null){
cell.setCellValue("");
}else{
cell.setCellValue(object);
}
}
public static void setCellValue(HSSFCell cell, Long object){
if(object == null){
cell.setCellValue("");
}else{
cell.setCellValue(object.doubleValue());
}
}
public static void setCellValue(HSSFCell cell, Double object){
if(object == null){
cell.setCellValue("");
}else{
cell.setCellValue(object.doubleValue());
}
}
public static void setCellValue(HSSFCell cell, double object){
cell.setCellValue(object);
}
public static void setCellValue(HSSFCell cell, Date object, String model){
if(object == null){
cell.setCellValue("");
}else{
cell.setCellValue(new SimpleDateFormat(model).format(object));
}
}
public static void setCellValue(HSSFCell cell, java.util.Date object, String model){
if(object == null){
cell.setCellValue("");
}else{
cell.setCellValue(new SimpleDateFormat(model).format(object));
}
}
public static void setCellValue(HSSFCell cell, BigDecimal object){
if(object == null){
cell.setCellValue("");
}else{
cell.setCellValue(object.toString());
}
}
//判断EXCEL表格高度用 row.setHeight((short) CellUtil.getExcelCellAutoHeight(TAR_VAL_ALL_STRING, 280, 30));
public static float getExcelCellAutoHeight(String str,float defaultRowHeight, int fontCountInline) {
int defaultCount = 0;
for (int i = 0; i < str.length(); i++) {
int ff = getregex(str.substring(i, i + 1));
defaultCount = defaultCount + ff;
}
if (defaultCount > fontCountInline){
return ((int) (defaultCount / fontCountInline) + 1) * defaultRowHeight;//计算
} else {
return defaultRowHeight;
}
}
public static int getregex(String charStr) {
if("".equals(charStr) || charStr == null){
return 1;
}
// 判断是否为字母或字符
if (Pattern.compile("^[A-Za-z0-9]+$").matcher(charStr).matches()) {
return 1;
}
// 判断是否为全角
if (Pattern.compile("[\u4e00-\u9fa5]+$").matcher(charStr).matches()) {
return 2;
}
//全角符号 及中文
if (Pattern.compile("[^x00-xff]").matcher(charStr).matches()) {
return 2;
}
return 1;
}
}
相关推荐
基于FaceX-Zoo实现的Face Mask Adding人脸戴口罩
人脸系列文章目录 文章目录人脸系列文章目录前言一、加口罩效果二、实现原理二、代码实现 前言 目前人脸加口罩均为在人脸位置贴图式的,非常不真实。前段时间京东开源一个基于PRnet实现的3D口罩拟合人脸,加口罩非常逼真,但是只是单独一个加口罩demo,没有完整的流程。于是本人结合人脸检测,关键点对齐。PRnet加口罩实现一个完整的加口罩流程。只需一个命令简单方便调用,实现人脸加口罩。 https://github.com/JDAI-CV/FaceX-Zoo 一、加口罩效果 下图可以看出效果还是非常逼真的
POI通过模板导出excel(包含表头合并处理)
最近接触到比较多poi相关的需求,总结一下通过模板导出以及表头合并的一些复杂情况处理
keil自动分配SDRAM空间设置使用
1.修改.sct文件。
Java使用POI操作Excel合并单元格
合并单元格,主要是采用数据模型,先把数据处理好,从中找规律
HI3403烧录全流程:从ToolPlatform安装到eMMC配置避坑指南
本文详细介绍了海思HI3403芯片的完整烧录流程,涵盖从ToolPlatform工具安装、驱动配置到eMMC分区策略的实战指南。文章深入解析了BurnTool工具的使用方法、关键配置项,并提供了烧录过程中的常见问题排查与解决方案,旨在帮助开发者高效、稳定地完成HI3403嵌入式系统的部署。
PYTHON 打印三角形大全
用PYTHON语言打印各种三角形
POI动态导出多层表头的EXCEL文件
POI动态导出多层表头的EXCEL文件欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 欢迎使用Markdown编辑器 以前接触过一个很古老的导出Excel,实现的逻辑是先声明一个导出的Exce
【C++】lambda表达式
本篇文章我们要学习的是lambda表达式,它是C++11新增的一种特别方便的语法,相较于之前的函数指针以及仿函数都方便了不少,下面就让我们一起来学习吧。
使用POI导出Excel复杂表头(超详细)
相信很多小伙伴不管是在项目开发中还是在学习过程中,会碰到这样的需求:导出一些复杂表头的报表。今天看我这篇保证你不在为此头痛,Begin 引入依赖: <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>5.2.2</version&.
ubuntu20 安装px4、mavros、QGroundControl
首先安装一下ant,否则没法运行,同时因20.04的缺少动态库libawt_xawt.so无法被Java8给调用,我的解决办法是去18.04把18.04的相同路径下的动态库libawt_xawt.so移动到20.04的/usr/lib/jvm/java-11-openjdk-amd64/lib/路径中。用rosdepc的时候,你得确保你用的是鱼香ROS的提供的ROS安装方法,否则是没有rosdepc的。make px4_sitl gazebo之前,可以安装一下gazebo的 模型。二、安装MAVROS。
Python 3.13.7 (64-bit)安装弹窗提示:Setup failed:0x80070643 - 安装时发生严重错误...如何解决?
🏆本文收录于 《全栈Bug调优(实战版)》 专栏,该专栏专注于分享我在真实项目开发中遇到的各类疑难Bug及其深层成因,并系统提供高效、可复现的解决思路和实操方案。无论你是刚入行的新手开发者,还是拥有多年项目经验的资深工程师,本专栏都将为你提供一条系统化、高质量的问题排查与优化路径,助力你加速成长,攻克技术壁垒,迈向技术价值最大化与职业发展的更高峰🚀!
excel导出多重表头utils_poi导出Excel报表多表头双层表头、合并单元格
效果图:controller层方法:/**** 导出Excel报表* @param request* @return**/@RequestMapping("/export")@ResponseBodypublic void export(HttpServletRequest request,HttpServletResponse response, String yearMonth) {try {...
AI Agent开发第49课-DIFY让AI自动预约排班后发企业微信通知-MongoDb-Redis-企业微信调用
我们的Dify会讲得很透彻,坚持喂饭级教程,从一个基本的AI自动预约客户到自动记录客户的信息再到自动判断下一步如何走全部是AI化的,这是一个真正的AI原生应用,它来自于我的一个大型物业公司用AI自动预约系统中的一部分。我们会使用这个预约流做完整的Dify例子来讲完,因为它太有代表性了。工作流中的控制反转、AI决策下一步怎么走、人为干涉、用户行为判断、外部中间件如Redis,今天我们就要讲到在Dify中调用MongoDB的数据以及企业微信通知来作为预约派单的最后一步了。
用POI实现双层标题excel打印
这个是将公司的一个工具栏改成的,以前工具类只能导出单层的excel 实现效果 写了一个方法,注解都在代码里 /** 带分类标题导出Excel的方法 * * @param title * excel中的sheet名称 * @param header_2 * 两列的头的标题 * @pa
IEM模型,地表粗糙度模拟
利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟
IMSL CNL 7.0.0 (x86-64)Crack
IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件
java poi 生成excel单个或多个表头
使用poi生成双表头,写的不是很好,还有很多可以改进的地方,希望大家谅解,此方法采用了java的反射机制来排除一些不需要导出的字段,如果一张表有一百多个字段的话写的有点累人,也容易出现问题,但是用用还是可以的,导出的效率也还有可以改进的地方 1,:TableExcel类 import java.io.ByteArrayInputStream; import java.io.ByteArrayO
WINCC7.3破解文件
WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!
使用POI生成动态多行表头
近期在进行一个报表项目,页面是做了一个模版,支持用户配置sql显示数据,自然而然导出也要支持动态数据,这里我采用POI导出功能,听说JXLS支持模版式的表头功能,也比较强大,毕竟是对POI进行了封装。 下面我对POI生成动态表头的功能做封装 这里提供了更详细的POI数据封装及流下载方式 概要 1.这里主要用到 CellRangeAddress合并单元格,这里明白构造方法的参
win10 跳过U8环境检测的IE WebControls.rar
win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。
使用poi生成复杂多行表头
最近公司的项目需要添加导出报表的功能,报表都是多行表头,最初是使用事先创建模板然后导出的方式,但是随着报表数量的增加和模板表头的变动,这种导出方案就不合适了。因此尝试使用了poi动态生成复杂多行表头的方式导出。说明一下,表头格式来源是根据页面表格属性生成的,其中页面表格是使用了jqgrid框架。以下是代码实现过程: 一、js获取表格属性的共用方法: 1、获取表格的行和列属性; ...
SAS learning_5: 统计报表制作(2)——PROC REPORT
二. PROC REPORT 1. 基本形式: PROC REPORT NOWINDOWS; COLUMN variable-list; RUN; 如果不写NOWINDOWS,SAS会打开交互性REPORT窗口; COLUMN命令:告诉SAS哪些变量以什么顺序被包含。(类似于PROC PRINT 的VAR 命令),如果不写这个命令,SAS会默认把数据集中所有变量纳入。 如果COLUMN命令中至...
3390



被折叠的 条评论
为什么被折叠?



