jasonrogena / jasonrogena/php-excel-reader

Column widths - wrapping text doesn't wrap, turning off extended info (no col_letters) skips width

Open
#55 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
PHP
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
What steps will reproduce the problem?
1. Try a spreadsheet with wrapped text set to General format (due to TEXT
data type limitation of 1,024 character display in Excel itself).
2. "if ($col_letters)" routine calls colwidth calculation so without
col_letters set, width is not calc'd? (there's no THEAD section in html
output when letters are turned off).
3. Colwidth calculation seems flawed: colwidth seems to depend on how
many characters there are in the cell versus reading the column width set
in XLS (??? could not validate as I don't have a good debugger to step
through code but appears so based on the comment in the colwidth
calculation that the calc is based on the "width of 0"). Note: column
widths are set for all columns in attached XLS and the routine does not
seem to read it based on the XLS setting but calculates the width to match
the max number of characters in the column.

What is the expected output? What do you see instead?

Expect to see wordwrapping with column width set to the same as the col
widths in the original XLS. In a word: WYSIWYG would be the goal (?)

Please provide any additional information below.

```

Original issue reported on code.google.com by `gandalf...@gmail.com` on 19 Dec 2009 at 6:29

Attachments:
- [word_wrap_example.xls](https://storage.googleapis.com/google-code-attachments/php-excel-reader/issue-55/comment-0/word_wrap_example.xls)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the behavior with the attached word_wrap_example.xls, focusing on the col_letters routine, the colwidth calculation, and the HTML output with the THEAD section disabled. Compare calculated widths and wrapping with the widths stored in the XLS; done means wrapped text displays with matching column widths whether or not extended column information is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.