我想读取多个文件并将它们存储到数据库中。这是我的代码,只读取一个文件。如何让它不止一个?
private static final String FILE_NAME = "C:/User/myFile.xlsx";
public static void main(String[] args) throws SQLException {
try {
FileInputStream excelFile = new FileInputStream(new File(FILE_NAME));
Workbook workbook = new XSSFWorkbook(excelFile);
Sheet datatypeSheet = workbook.getSheetAt(0);
Iterator<Row> iterator = datatypeSheet.iterator();
}
}