private void chooseExcelExecutor(ReadWorkbook readWorkbook) throws Exception {
        // Determine the type of Excel file based on the provided readWorkbook
        ExcelTypeEnum excelType = ExcelTypeEnum.valueOf(readWorkbook);
        switch (excelType) {
            case XLS:
                POIFSFileSystem poifsFileSystem;
                // Initialize POIFSFileSystem based on whether a file or input stream is provided
                if (readWorkbook.getFile() != null) {
                    poifsFileSystem = new POIFSFileSystem(readWorkbook.getFile());
                } else {
                    poifsFileSystem = new POIFSFileSystem(readWorkbook.getInputStream());
                }
                // So in encrypted excel, it looks like XLS but it's actually XLSX
                if (poifsFileSystem.getRoot().hasEntry(Decryptor.DEFAULT_POIFS_ENTRY)) {
                    InputStream decryptedStream = null;
                    try {
                        // Decrypt the Excel file and treat it as XLSX for processing
                        decryptedStream = DocumentFactoryHelper
                            .getDecryptedStream(poifsFileSystem.getRoot().getFileSystem(), readWorkbook.getPassword());
                        XlsxReadContext xlsxReadContext = new DefaultXlsxReadContext(readWorkbook, ExcelTypeEnum.XLSX);
                        analysisContext = xlsxReadContext;
                        excelReadExecutor = new XlsxSaxAnalyser(xlsxReadContext, decryptedStream);
                        return;
                    } finally {
                        // Close the decrypted stream and POIFSFileSystem to prevent resource leaks
                        IOUtils.closeQuietly(decryptedStream);
                        poifsFileSystem.close();
                    }
                }
                // Set the user password for processing encrypted Excel files
                if (readWorkbook.getPassword() != null) {
                    Biff8EncryptionKey.setCurrentUserPassword(readWorkbook.getPassword());
                }
                XlsReadContext xlsReadContext = new DefaultXlsReadContext(readWorkbook, ExcelTypeEnum.XLS);
                xlsReadContext.xlsReadWorkbookHolder().setPoifsFileSystem(poifsFileSystem);
                analysisContext = xlsReadContext;
                excelReadExecutor = new XlsSaxAnalyser(xlsReadContext);
                break;
            case XLSX:
                // Directly create a context and executor for processing XLSX files
                XlsxReadContext xlsxReadContext = new DefaultXlsxReadContext(readWorkbook, ExcelTypeEnum.XLSX);
                analysisContext = xlsxReadContext;
                excelReadExecutor = new XlsxSaxAnalyser(xlsxReadContext, null);
                break;
            case CSV:
                // Create a context and executor for processing CSV files
                CsvReadContext csvReadContext = new DefaultCsvReadContext(readWorkbook, ExcelTypeEnum.CSV);
                analysisContext = csvReadContext;
                excelReadExecutor = new CsvExcelReadExecutor(csvReadContext);
                break;
            default:
                // Reserved branch for handling potential future Excel types
                break;
        }
    }
Chooses the appropriate Excel execution strategy based on the type of Excel file
This method deals with different types of Excel files by creating corresponding processing contexts and executors

@param readWorkbook The workbook to be read, containing the necessary information for Excel reading
@throws Exception if an error occurs while reading the Excel file
fastexcel-core/src/main/java/cn/idev/excel/analysis/ExcelAnalyserImpl.java