Microsoft Excel Input: allow regex patterns for sheet name selection#7059
Open
Wassim67 wants to merge 1 commit intoapache:mainfrom
Open
Microsoft Excel Input: allow regex patterns for sheet name selection#7059Wassim67 wants to merge 1 commit intoapache:mainfrom
Wassim67 wants to merge 1 commit intoapache:mainfrom
Conversation
Allows users to specify a Java regex pattern as a sheet name in the Microsoft Excel Input transform. When 'Regex?' is set to 'Yes', all sheets whose names match the pattern are read sequentially, using the same start row/column settings. Changes: - ExcelInputMeta: add isRegex field on EISheet + hasRegexSheets() - ExcelInput: resolve regex patterns per-workbook via resolveSheetNamesFromRegex() - ExcelInputDialog: add Regex? column (Yes/No combo) in the Sheets tab - messages_en_US.properties: add SHEET_IS_REGEX and IsRegex.Column keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a Regex? column (Yes/No) in the Sheets tab of the Microsoft Excel Input transform. When set to Yes, the sheet name is treated as a Java regular expression and matched against all available sheets in the workbook at runtime. All matching sheets are read sequentially with the same start row/column settings.
Example: pattern
Data_.*automatically readsData_Jan,Data_Feb,Data_Marwithout listing each sheet manually.addresses #7058
Changes
ExcelInputMeta— addisRegexboolean field onEISheet(persisted as<is_regex>), addhasRegexSheets()helperExcelInput— addresolveSheetNamesFromRegex(): expands regex entries against actual workbook sheet names at open time; graceful skip if no matchExcelInputDialog— add Regex? Yes/No combo column in the Sheets table;processingWorkbook()uses regex-aware matching for "Get Fields"messages_en_US.properties— addExcelInputDialog.IsRegex.Column,ExcelInput.Injection.SHEET_IS_REGEX,ExcelInput.Error.InvalidSheetRegexChecklist
mvn spotless:applyappliedmvn apache-rat:checkpasses