Problem/Motivation
Cells with multi-line text show in one row which makes spreadsheets hard to read.
Steps to reproduce
Create a view with multi-line content (WYSIWYG content for example)
Export results in XLSX
Proposed resolution
Adjust code to enable wrapping and auto-height for the row.
Something like
foreach($sheet->getRowDimensions() as $row_id) {
$row_id->setRowHeight(-1);
}
$sheet->getStyle('A1:' . implode('', $sheet->getHighestRowAndColumn()))->getAlignment()->setWrapText(true);
Remaining tasks
N/A
User interface changes
No changes, so far. Though, it might be a good idea to make it configurable.
API changes
No changes, so far
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3224446-5.patch | 1.5 KB | spelcheck |
Issue fork xls_serialization-3224446
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3224446-enable-auto-height-and
changes, plain diff MR !5
Comments
Comment #3
alex liannoy commentedCreated initial patch which adds the requested feature.
Without an interface, but functioning.
Comment #4
kepesv commentedI can confirm that patch is working
Comment #5
spelcheck commentedConfirmed working.
I needed this as a simple patch for our composer workflow, created against 1.x-dev for anyone in our position.
Comment #8
theemstra commented