Saved header and footer values not displayed in form and errors generating XLSX

Created on 22 July 2024, 5 months ago
Updated 5 August 2024, 4 months ago

Problem/Motivation

We encountered a couple small errors trying to set a header or footer in the xlsx Settings for the export style options. This is with module version 2.0.3 and Drupal core 10.3.1, but also reproducible in core 10.2.x.

  1. "Print header" or "Print footer" value appears to save correctly after being entered, and exports correctly with drush cex. However, trying to reopening the style options modal after saving the header or footer value either results in an error with the modal not opening, or the modal opens and the field contents are empty. Watchdog log shows: "InvalidArgumentException: "value" is an invalid render array key. Value should be an array but got a string. in Drupal\Core\Render\Element::children() (line 97 of {...}/core/lib/Drupal/Core/Render/Element.php)."
  2. If a header is configured, when clicking a link to download the spreadsheet (via batch), there is an ajax error. Watchdog log shows:"Drupal\Component\Serialization\Exception\InvalidDataTypeException: Merge must be on a valid range of cells. in Drupal\views_data_export_phpspreadsheet\Encoder\XlsEncoder->encode() (line 316 of {...}/modules/contrib/views_data_export_phpspreadsheet/src/Encoder/XlsEncoder.php)."
  3. If phpoffice/phpspreadsheet is version 2+ and a footer is entered, when clicking a link to download the spreadsheet (via batch), there is an ajax error. Watchdo log shows: "Error: Call to undefined method PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::mergeCellsByColumnAndRow() in Drupal\views_data_export_phpspreadsheet\Encoder\XlsEncoder->encode() (line 307 of {...}/modules/contrib/views_data_export_phpspreadsheet/src/Encoder/XlsEncoder.php)."

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024