天天看點

Hutool讀取Excel表資料

public static void main(String[] args) {
        File file = new File("D:\\excel\\項目資訊.xls");
        ExcelReader reader = ExcelUtil.getReader(file);
        List<Map<String, Object>> maps = reader.readAll();
        //List<Person> all = reader.readAll(Person.class);
        System.out.println(JSON.toJSONString(maps,true));
        reader.close();
    }