Enable auto-height and wrapping for rows with multi-line text

Created on 20 July 2021, over 3 years ago
Updated 29 May 2023, over 1 year ago

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

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine Alex Liannoy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024