当前位置 : 主页 > 编程语言 > java >

数据导入

来源:互联网 收集:自由互联 发布时间:2021-06-28
记录 数据导入 package com.iss.autoCheck.util;import java.io.File;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStream;import java.text.DecimalFormat;import java.util.ArrayList;import java.util.List;impo
记录 数据导入
package com.iss.autoCheck.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

import javax.imageio.stream.FileImageInputStream;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
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.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.junit.runner.RunWith;
import org.springframework.util.StringUtils;

import com.iss.autoCheck.dto.Aaa;
public class TestUtil {
	public static List
 
   excel() throws IOException{
		File file= new File("E://学员详细信息表.xls");
		InputStream is=new FileInputStream(file);
		HSSFWorkbook xw=new HSSFWorkbook(is);  
		List
  
    list=new ArrayList
   
    (); int sheetRow=xw.getNumberOfSheets(); System.out.println(sheetRow+"0000=-=-="); for(int i=0;i
   
  
 
网友评论