jasonrogena / jasonrogena/php-excel-reader
when you set borders around fusioned cells in excel they are not displayed correctly by the dump function
Open
Nobody has claimed this yet.
auto-migrated
Priority-Medium
Type-Defect
- Dominant language
- PHP
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Version used : 2.21
when you drow borders around cells that are fusioned in
excel, they are not displayed as it should.
Sample step to reproduce : in excel, take a rectangle of 2x3 cells,
write a text in this fusion, set a border around this fusion.
Solution (the number on the left is the line number in
excel_reader2.php) :
445: // Borders
446: $bLeft = $this->borderLeft($row,$col,$sheet);
447: $bRight = $this->borderRight($row,$col,$sheet);
448: $bTop = $this->borderTop($row,$col,$sheet);
449: $bBottom = $this->borderBottom($row,$col,$sheet);
450: $rowspan = $this->rowspan($row,$col,$sheet);
+ $colspan = $this->colspan($row,$col,$sheet);
+ if ($rowspan>1) { $bBottom=$this->borderBottom($row+$rowspan-1,$col+
$colspan-1,$sheet); }
+ if ($colspan>1) { $bRight=$this->borderRight($row+$rowspan-1,$col+
$colspan-1,$sheet); }
451: $bLeftCol = $this->borderLeftColor($row,$col,$sheet);
452: $bRightCol = $this->borderRightColor($row,$col,$sheet);
453: $bTopCol = $this->borderTopColor($row,$col,$sheet);
454: $bBottomCol = $this->borderBottomColor($row,$col,$sheet);
Original issue reported on code.google.com by wilfrid....@gmail.com on 8 Jul 2009 at 10:36
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in excel_reader2.php around lines 445-454, where the dump function reads borders for merged cells. Reproduce the issue with a bordered 2x3 merged range in Excel and compare the dumped borders with the proposed row and column span handling. Done means the merged range displays its right and bottom borders correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100