|
|
|
@ -2,7 +2,6 @@ package com.dsideal.base.Tools;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.poi.excel.ExcelReader;
|
|
|
|
|
import cn.hutool.poi.excel.ExcelUtil;
|
|
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.*;
|
|
|
|
@ -35,12 +34,12 @@ public class DataTransformer {
|
|
|
|
|
//拆分每一行的数据
|
|
|
|
|
for (int i = 0; i < reader.getColumnCount(); i++) {
|
|
|
|
|
if (!fixedColumns.contains(i)) {//非fixedColumns列进行枚举
|
|
|
|
|
//输出固定列的名称和值
|
|
|
|
|
for (int cNum : fixedColumns) {
|
|
|
|
|
String cName = colNames[cNum];//列名
|
|
|
|
|
String value = row.get(cNum).toString();//列值
|
|
|
|
|
System.out.print(cName + ":" + value+" ");
|
|
|
|
|
System.out.print(cName + ":" + value + " ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String cName = colNames[i];//列名
|
|
|
|
|
String value = row.get(i).toString();
|
|
|
|
|
System.out.print(cName + ":" + value);
|
|
|
|
|