Skip to content

Images, formulas and checkboxes disappear #4280

@kboumedal

Description

@kboumedal

This is:

- [x] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the current behavior?

Images (sheet "Accueil"), formulas (sheet "Data" cell C15) and checkboxes (sheet "Renovez votre maison) disappear after IOFactory::createWriter and save

What are the steps to reproduce?

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

<?php

require __DIR__ . '/vendor/autoload.php';

// Create new Spreadsheet object
        $spreadsheet = IOFactory::load(
[Simulateur_B_to_C_8.1_SANS_MACRO_2025 - Copie.xlsx](https://github.com/user-attachments/files/18151163/Simulateur_B_to_C_8.1_SANS_MACRO_2025.-.Copie.xlsx)
);

$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');

$temporaryPathfile = rtrim(sys_get_temp_dir(), \DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR.md5(uniqid().mt_rand());

$writer->save($temporaryPathfile);

### What features do you think are causing the issue

- [ ] Reader
- [x] Writer
- [ ] Styles
- [ ] Data Validations
- [ ] Formula Calculations
- [ ] Charts
- [ ] AutoFilter
- [ ] Form Elements

### Which versions of PhpSpreadsheet and PHP are affected?

PhpSpreadsheet 3.6, PHP8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions