package com.xjrsoft.xjrsoftboot;


import cn.hutool.core.lang.Console;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.sax.handler.RowHandler;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.Scanner;

/**
 * @author dzx
 * @date 2023/12/8
 */
public class KbTest {

    public static void main(String[] args){
//        String filePath = "C:\\Users\\建刚\\Desktop\\课表\\1数据_接口.H";
//
//
//
//        try {
//            BufferedReader reader = new BufferedReader(new FileReader(filePath));
//            String line;
//            while ((line = reader.readLine()) != null) {
//                System.out.println(line);
//                if("struct".startsWith(line)){
//                    System.out.println("11");
//                }
//            }
//            reader.close();
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
        String filePath = "D:\\workspace\\其他\\学生信息（筛选过）2.xlsx";
        RowHandler rowHandler = new RowHandler() {
            @Override
            public void handle(int i, long l, List<Object> list) {

            }
        };
        ExcelUtil.readBySax(filePath, 0, createRowHandler());

    }

    private static RowHandler createRowHandler() {
        return new RowHandler() {
            @Override
            public void handle(int sheetIndex, long rowIndex, List<Object> rowlist) {
                Console.log("[{}] [{}] {}", sheetIndex, rowIndex, rowlist);
            }
        };
    }


}
