I am trying to parse xlsx file , this file has lot of sheets , using SpreadsheetMLPackage.load.getWorkbookPart () I can get WorkbookPart, this has List of sheets, I want to get WorksheetPart for each Sheet to get the sheetdata.Please advice me how.
- Code: Select all
SpreadsheetMLPackage xlsxPkg = SpreadsheetMLPackage.load(new java.io.File(inputfilepath));
WorkbookPart workbookPart= xlsxPkg.getWorkbookPart();
workbookPart.getContents().getSheets().getSheet().forEach((Sheet sheet)->{
System.out.println(sheet.getName()+" "+sheet.getId());
});