説明:EXCELはxlsとxlsxの2つのフォーマットをサポートします.
テスト済み!
1 package main.java;
2
3 import org.apache.poi.ss.usermodel.*;
4
5 import java.io.File;
6 import java.io.FileInputStream;
7 import java.io.IOException;
8 import java.util.ArrayList;
9 import java.util.HashMap;
10 import java.util.List;
11 import java.util.Map;
12
13 public class ExcelReader {
14 private String filePath;
15 private String sheetName;
16 private Workbook workBook;
17 private Sheet sheet;
18 private List columnHeaderList;
19 private List> listData;
20 private List
転載先:https://www.cnblogs.com/linbo3168/p/7464323.html