jasonrogena / jasonrogena/php-excel-reader
with the dump function, the width of your excel columns are not set as they should in resulting html code
- Dominant language
- PHP
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
When you choose to not display col letters...
__________________________
$data = new Spreadsheet_Excel_Reader($fileurl);
echo $data->dump(false,false);
__________________________
the width of your excel columns are not kept
Solution :
587: function dump($row_numbers=false,$col_letters=false,
$sheet=0,$table_class='excel') {
586: $out = "";
++ if ($row_numbers) {
++ $out .= "\n\t\t";
++ }
++ for($i=1;$i<=$this->colcount($sheet);$i++) {
++ $style = "width:" .
($this->colwidth($i,$sheet)*1) . "px;";
++ if ($this->colhidden($i,$sheet)) {
++ $style .= "display:none;";
++ }
++ $out .= "\n\t\t";
++ }
589: if ($col_letters) {
590: $out .= "\n\t";
591: if ($row_numbers) {
592: $out .= "\n\t\t";
593: }
594: for($i=1;$i<=$this->colcount($sheet);$i++) {
595: $style = "width:" .
($this->colwidth($i,$sheet)*1) . "px;";
596: if ($this->colhidden($i,$sheet)) {
597: $style .= "display:none;";
598: }
599: $out .= "\n\t\t";
600: }
601: $out .= "\n";
602: }
remark : here we take advantage of the tag for setting column
widths.
```
Original issue reported on code.google.com by `wilfrid....@gmail.com` on 8 Jul 2009 at 10:38
" .
strtoupper($this-
>colindexes[$i]) . "
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the dump() entry point and inspect how colwidth(), colhidden(), and the col_letters option affect the generated table markup. Reproduce the example with dump(false,false) and verify that the resulting HTML preserves each spreadsheet column's width and hidden state when column letters are omitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100