Skip to content

Microsoft Excel Input: allow regex patterns for sheet name selection#7059

Open
Wassim67 wants to merge 1 commit intoapache:mainfrom
Wassim67:feature/excel-input-sheet-name-regex
Open

Microsoft Excel Input: allow regex patterns for sheet name selection#7059
Wassim67 wants to merge 1 commit intoapache:mainfrom
Wassim67:feature/excel-input-sheet-name-regex

Conversation

@Wassim67
Copy link
Copy Markdown

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 reads Data_Jan, Data_Feb, Data_Mar without listing each sheet manually.

addresses #7058

Changes

  • ExcelInputMeta — add isRegex boolean field on EISheet (persisted as <is_regex>), add hasRegexSheets() helper
  • ExcelInput — add resolveSheetNamesFromRegex(): expands regex entries against actual workbook sheet names at open time; graceful skip if no match
  • ExcelInputDialog — add Regex? Yes/No combo column in the Sheets table; processingWorkbook() uses regex-aware matching for "Get Fields"
  • messages_en_US.properties — add ExcelInputDialog.IsRegex.Column, ExcelInput.Injection.SHEET_IS_REGEX, ExcelInput.Error.InvalidSheetRegex

Checklist

  • mvn spotless:apply applied
  • mvn apache-rat:check passes
  • Licensed under the Apache License Version 2.0

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant