Skip to content

Add colorful table formatting features and corresponding tests#2

Open
lescoggi wants to merge 1 commit intomainfrom
lescoggi-issue-1
Open

Add colorful table formatting features and corresponding tests#2
lescoggi wants to merge 1 commit intomainfrom
lescoggi-issue-1

Conversation

@lescoggi
Copy link
Copy Markdown
Owner

Fixes #1

@lescoggi lescoggi requested a review from Copilot June 11, 2025 03:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 colorTheme in the Apply Table Formatting section differs from theme used 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 theme is 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");

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.

Enable colorful formatting for tables when creating Excel files

2 participants