Skip to content

Unable to access External Workbook #4075

@CosminCotulbea

Description

@CosminCotulbea

Hello,

I have this issues where i get this error "Unable to access External Workbook".
I'm trying to convert an xlsx file into a pdf or html but on writer save i get this error.

I tryed in two ways:
1)

$xml = new PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$xml->setIncludeCharts(true);
$spreadsheet = $xml->load($localTempFile);
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet);
$writer->setIncludeCharts(true);
$writer->writeAllSheets();
$writer->save('throwing_excel.html');

$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx');
$reader->setIncludeCharts(true);
$document = $reader->load($localTempFile);
$writer = new Dompdf($document);
$writer->setIncludeCharts(true);
$writer->save('throwing_excel.pdf');

The error is thrown when I call the save method on the last row.

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