We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How to read multi sheets every sheet into separated lists?
The text was updated successfully, but these errors were encountered:
@saraselim1 There is API to read by sheet no. You just need to pass the sheet number as third argument to read method. Check below for usage..
read
... final File xlsxFile = new File("<path_to_file>"); final XlsReader reader = new XlsReader(); List<Employee> employees = reader.read(Employee.class, xlsxFile, <sheet_no>); ...
As each sheet read is independent of other, each sheet can be mapped to different Class. Something like below..
... final File xlsxFile = new File("<path_to_file>"); final XlsReader reader = new XlsReader(); // Sheet 1 is mapped to Teacher.class List<Teacher> teachers = reader.read(Teacher.class, xlsxFile, 1); // Sheet 2 is mapped to Student.class List<Student> students = reader.read(Student.class, xlsxFile, 2); ...
Hope this helps. Will add this to Documentation.
Sorry, something went wrong.
Dear @millij What if I want to read get the sheet by its name, not number?
@saraselim1 We don't have any API in SpreadsheetReader to read sheet by it's name. As it's a valid request, will take this up in the next release..
SpreadsheetReader
millij
No branches or pull requests
How to read multi sheets every sheet into separated lists?
The text was updated successfully, but these errors were encountered: