apache / apache/poi

XSLF Merged Table Cell Border gaps

Open
#1,048 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
844
Avg merge
5h 52m
Merged PRs (30d)
47

Description

Drawing borders around merged table cells in POI XLSF so that they render well in MS PowerPoint is very problematic. The borders produced leave many gaps.

This simple demonstration creates a 5 row x 3 column table of cells, merges the cells on the top row and gives them a red border, leaves a row as gap, then merges the 3 cells in the middle column and gives them a blue border. The result shown in PowerPoint is:

Image

The code to produce this was:

[MergedCellBorderProblem.java](https://github.com/user-attachments/files/26892894/MergedCellBorderProblem.java)

It would be ideal if POI XSLF could internally apply the same border styling from the neighboring cells as this seems to be what is required to plug the gaps.

Even with simple (non merged) cells, it was seen in https://bz.apache.org/bugzilla/show_bug.cgi?id=69501 that unless you're in 1st row or 1st column, only bottom and right edge border settings come through in MS PowerPoint (just setting top or left edges on cells gets ignored by powerpoint, even though the saved slide.xml shows that POI has written them out).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked MergedCellBorderProblem.java reproducer and compare its generated slide.xml with how MS PowerPoint renders the merged-cell borders. Review the related Bugzilla 69501 behavior for non-merged cells; done means merged and ordinary table borders render without the reported gaps, including interior top and left edges.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.