public List<RcdXlsWorkbook> parseImports() { LinkedList<RcdXlsWorkbook> xlsWorkbookLinkedList = new LinkedList<>(); if (IMPORT_FOLDER_PATH.toFile().exists()) { // For each DNB account RcdFileService.listSubPaths( IMPORT_FOLDER_PATH, dnbAccountFolderPath -> { // For each month report RcdFileService.listSubPaths( dnbAccountFolderPath, dnbAccountMonthReportPath -> { // Parses the report final RcdXlsWorkbook xlsWorkbook = RcdXlsService.read(dnbAccountMonthReportPath); xlsWorkbookLinkedList.add(xlsWorkbook); }); }); } return xlsWorkbookLinkedList; }
private RcdXlsWorkbook parseInputFile(final Path inputFilePath) throws Exception { RcdLogService.info("Parsing input file '" + inputFilePath + "'..."); final RcdXlsWorkbook workbook = RcdXlsService.read(inputFilePath); RcdLogService.info("Input file parsed!"); return workbook; }