Add colorful table formatting features and corresponding tests#2
Open
Add colorful table formatting features and corresponding tests#2
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds colorful table formatting capabilities to the Excel features library, accompanied by new tests and updated documentation.
- Introduces methods to create and apply styled tables, conditional formatting, and custom borders.
- Adds corresponding unit tests to verify each new feature.
- Updates README with usage details for the new formatting tools.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/test/java/dev/lescoggi/ExcelFeaturesTest.java | Added tests for createFormattedTable, applyTableFormatting, applyConditionalFormatting, and applyCustomBorders |
| README.md | Documented the new colorful table formatting tools, themes, and usage examples |
Comments suppressed due to low confidence (5)
README.md:62
- The argument name
colorThemein the Apply Table Formatting section differs fromthemeused elsewhere. Consider standardizing on one term to avoid confusion.
`colorTheme` - Color theme: `blue`, `green`, `orange`
src/test/java/dev/lescoggi/ExcelFeaturesTest.java:138
- [nitpick] We test explicit themes but not the default behavior when
themeis omitted or null. Consider adding a test for the default theme fallback.
var response = excelFeatures.createFormattedTable(workbookPath, SHEET_NAME, tableData, "blue", true);
src/test/java/dev/lescoggi/ExcelFeaturesTest.java:173
- The cell range "A0:C2" is not a valid Excel reference (rows start at 1). Please update to something like "A1:C3" or the intended 1-based range.
var response = excelFeatures.applyTableFormatting(workbookPath, SHEET_NAME, "A0:C2", "blue", true);
src/test/java/dev/lescoggi/ExcelFeaturesTest.java:188
- Using "A0:C2" here will likely cause an invalid range error at runtime. Adjust to a valid reference, for example "A1:C3".
var response = excelFeatures.applyConditionalFormatting(
workbookPath, SHEET_NAME, "A0:C2", "greater_than", "50", "red");
src/test/java/dev/lescoggi/ExcelFeaturesTest.java:203
- The range "A0:C1" is invalid in Excel; consider starting at row 1 (e.g., "A1:C2").
var response = excelFeatures.applyCustomBorders(
workbookPath, SHEET_NAME, "A0:C1", "thick", "blue");
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.
Fixes #1