Support for phpoffice/phpspreadsheet 2.x

Created on 2 May 2025, 13 days ago

Problem/Motivation

We use other modules in our site that depend on the phpoffice/phpspreadsheet library. Right now we have to alias a newer (but still compatible) version to the maximum version that Views Data Export allows.

Other modules that we use have the following Composer constraints for this library:

  • Feeds XLSX: ^2.0
  • VBO Export: ^2.2
  • XLS Serialization: ^2.2.1

It would be nice if we could keep all the modules using the same version so we didn't have to deal with aliasing.

Steps to reproduce

N/A, Composer dependency incompatibility.

Proposed resolution

Update Views Data Export to support phpoffice/phpspreadsheet 2.x.

Remaining tasks

  • Update the phpoffice/phpspreadsheet dependency
  • Follow the changelog to account for any deprecations or breaking changes
  • Test

User interface changes

None.

API changes

There may be some documented in the changelog, but aiming for there to be none at the Drupal level.

Data model changes

None.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia geoffreyr Sydney, AU / Gadigal country

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

Comments & Activities

  • Issue created by @geoffreyr
  • πŸ‡¬πŸ‡§United Kingdom steven jones

    I don't particularly see an explicit dependency from Views Data Export to phpoffice/phpspreadsheet, where is that?

    I can see that we are indeed calling some phpoffice/phpspreadsheet code, are you saying that the API has changed upstream and we need to sort VDE out?

    Can you outline what changes you'd like to see VDE make or outline the errors you're seeing please?

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    Not OP, but I was looking into this recently.

    Here is what I got for module dependencies on phpoffice/phpspreadsheet.

    Notice views_data_export says conflicts < 1.23.0. This actually means it conflicts with versions under 1.23.0, so anything over that is allowed.

    $ ddev composer why phpoffice/phpspreadsheet
    drupal/complete_webform_exporter        1.0.4   requires  phpoffice/phpspreadsheet (^1.1 || ^2.1)   
    drupal/feeds_xlsx                       1.0.1   requires  phpoffice/phpspreadsheet (^2.0)           
    drupal/permission_spreadsheet           2.1.1   requires  phpoffice/phpspreadsheet (^1 || ^2 || ^3) 
    drupal/phpexcel                         4.0.2   requires  phpoffice/phpspreadsheet (^1 || ^2)       
    drupal/trucie                           1.2.0   requires  phpoffice/phpspreadsheet (^2.0)           
    drupal/vbo_export                       4.x-dev requires  phpoffice/phpspreadsheet (^2.2)           
    drupal/views_data_export                1.5.0   conflicts phpoffice/phpspreadsheet (<1.23.0)        
    drupal/views_data_export_phpspreadsheet 2.0.6   requires  phpoffice/phpspreadsheet (^1 || ^2 || ^3) 
    
    
  • πŸ‡¦πŸ‡ΊAustralia geoffreyr Sydney, AU / Gadigal country

    @mortona2k Thanks for your dependency resolution example. Good pickup on the conflicts.
    @steven jones I'll see if I can outline what I'm thinking along with a patch. I might have to dig into it a bit deeper to see why it's not using 2.x for the particular site I'm looking at.

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    @geoffreyr - use the composer why command (see the example above).

    Or try why-not <package> <version>.

Production build 0.71.5 2024