Workbook workbook = null;标签:Java,Excel,Sheet,file,new,workbook,XSSF,getInputStream From: https://blog.51cto.com/u_15482433/5825933
try {
workbook = new HSSFWorkbook(file.getInputStream()); //将获取的流转成Excel
}catch(Exception ex){
workbook = new XSSFWorkbook(file.getInputStream()); //将获取的流转成Excel
}
Sheet sheet1 = workbook.getSheetAt(0);//获取Sheet