Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求助!csv文件如何从第一行开始读取?我用这个代码默认从第2行开始读 #240

Open
zhengjunjie21260 opened this issue Feb 25, 2025 · 2 comments

Comments

@zhengjunjie21260
Copy link

从第一行开始读取应该怎么做,求大佬

@zhengjunjie21260
Copy link
Author

Image

@xi-mad
Copy link

xi-mad commented Feb 26, 2025

增加.headRowNumber(0)
Image

    FastExcel.read(Solution.class.getResourceAsStream("1.csv"), Test.class, new ReadListener<Test>() {

                @Override
                public void invoke(Test data, AnalysisContext context) {
                    System.out.println(data);
                }

                @Override
                public void doAfterAllAnalysed(AnalysisContext context) {
                }
            })
            .headRowNumber(0)
            .excelType(ExcelTypeEnum.CSV)
            .sheet().doRead();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants