You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [*] 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 expected behavior?
Convert a .xls spreadsheet with charts to PDF: the PDF contains the same charts
What is the current behavior?
When converting a .xls spreadsheet to PDF, the PDF has no charts at all
<?phpusePhpOffice\PhpSpreadsheet\IOFactoryasSpreadsheetIOFactory;
usePhpOffice\PhpSpreadsheet\Writer\Pdf\MpdfasExcelMPDF;
// Set a class which will render the charts.
\PhpOffice\PhpSpreadsheet\Settings::setChartRenderer(
\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class
);
// Load the document.$reader = SpreadsheetIOFactory::createReader('Xls');
$reader->setIncludeCharts(true);
$document = $reader->load('demo-xls-file.xls');
// Set up the writer$writer = newExcelMPDF($document);
$writer->setIncludeCharts(true);
$writer->save('demo-xls-file.pdf');
Screenshot of the source xls file:
Screenshot of the result PDF file:
What features do you think are causing the issue
Reader
[*] Writer
Styles
Data Validations
Formula Calculations
[*] Charts
AutoFilter
Form Elements
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
This is for .xls files
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet 1.29.0
I'm using PHP 8.1.23
The text was updated successfully, but these errors were encountered:
You are unfortunately correct. There is no support for charts for xls. There is also precious little information on how to generate or read a chart in the BIFF format which xls uses. I have added a note to issue #3403 to formally document this lack of support, and will therefore close this issue now. Sorry.
This is:
What is the expected behavior?
Convert a .xls spreadsheet with charts to PDF: the PDF contains the same charts
What is the current behavior?
When converting a .xls spreadsheet to PDF, the PDF has no charts at all
What are the steps to reproduce?
Use attached .xls demo file.
demo-xls-file.xls
Use the following code:
Screenshot of the source xls file:

Screenshot of the result PDF file:

What features do you think are causing the issue
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
This is for .xls files
Which versions of PhpSpreadsheet and PHP are affected?
The text was updated successfully, but these errors were encountered: