private static void doObtainTableUnitMapping(Map<String, List<String>> tableUnits, Set<String> unitSet,
			String filename) throws FileNotFoundException, IOException {
		Calendar cal = Calendar.getInstance();
		int year = cal.get(Calendar.YEAR) - 1911;
		int month = cal.get(Calendar.MONTH) < 7 ? 3 : 10;
		File cacheFile = new File(TVDB_WORK_DIR, year + "-" + month + "/" + filename);

		if (!cacheFile.exists()) {
			throw new FileNotFoundException("File not found: " + cacheFile.getAbsolutePath() + "\n"
					+ "Should open JU@.ods and run the macro to generate the missing file.");
		}

		String line;

		try (BufferedReader rd = new BufferedReader(new FileReader(cacheFile))) {
			while ((line = rd.readLine()) != null) {
				String tableName = line.substring(0, line.indexOf(':'));
				String unitStr = line.substring(line.indexOf(':') + 1);

				List<String> units;

				if (!tableUnits.containsKey(tableName)) {
					tableUnits.put(tableName, new ArrayList<String>());
				}

				units = tableUnits.get(tableName);

				for (String unit : unitStr.split(",")) {
					unit = unit.trim();
					if (unit.isEmpty())
						continue;

					units.add(unit);
				}

				if (unitSet != null)
					unitSet.addAll(units);
			}
		}
	}