package excelrunner; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; /** * * @author nurhak.kaya */ public class ExcelRunner { public static void main(String[] args) throws IOException { String fileName = "data.xlsx"; List sheetData = new ArrayList(); FileInputStream fis = null; try { fis = new FileInputStream(fileName); XSSFWorkbook workbook = new XSSFWorkbook(fis); XSSFSheet sheet = workbook.getSheetAt(0); Iterator rows = sheet.rowIterator(); while (rows.hasNext()) { XSSFRow row = (XSSFRow) rows.next(); Iterator cells = row.cellIterator
Solution Architect | Umbraco Certified Master | Umbraco MVPx3 | Certified ScrumMaster
"Anyone can cook, but only the fearless can be great." Ratatouille