Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel shows "We found a problem" error when the sheet name is set to empty string #528

Open
tdclaritum opened this issue Sep 19, 2024 · 1 comment

Comments

@tdclaritum
Copy link

If the sheet name is set to empty string the following error appears
image

After the file is fixed the sheet name is Recovered_Sheet1.

This error appear when opening the file with Microsoft Excel For Mac Version 16.89.1 (24091630). No error nessage if the file is opened with LibreOffice

Code to reproduce

<?php
require_once "vendor/autoload.php";

$excel = new \Vtiful\Kernel\Excel(['path' => __DIR__ . '/data/cache/']);

$dateFile = $excel->fileName("free.xlsx", '')
    ->header(['date']);

$excel->insertText(1, 0, "1");


$dateFile->output();

Expected: no error to appear when opening the file
Actual: the error above appears when opening the file

Details and versions

xlswriter support => enabled
Version => 1.5.7
bundled libxlsxwriter version => 1.1.3
bundled libxlsxio version => 0.2.27
PHP 8.2.23 (cli) (built: Sep  7 2024 01:30:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.23, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.23, Copyright (c), by Zend Technologies
    with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@tdclaritum and others