Nov 24

Once you have opened your Excel file you are probably going to want to access sheets within that file.

The Workbook class contains methods to access sheets by index or by name as shown in the following examples.

int nsheets = workbook.getNumberOfSheets();
for (int i=0; i<nsheets; i++) {
    Sheet sheet = workbook.getSheetAt(i);
				
    // Now you can access the sheet
}

And to access a sheet by name.

Sheet sheet = workbook.getSheet(sheetName);

Stay tuned as we continue to investigate using POI.

written by objects \\ tags: , , ,


Leave a Reply

You must be logged in to post a comment.