Ask questionsMiss Dynamic Tables
This is:
- [ ] a bug report
- [V] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)
Open the excel file (.xlsx) with dynamic tables and save the same file with dynamic tables
The spreadsheet opens the excel file and saves the file without dynamic tables. Only plain text.
Use reader fuction to open the file Force to readonly Define a worksheet Use writer function to save the file
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 = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
// add code that show the issue here...
$inputFileName = 'template-sample.xlsx';
$inputFileType = IOFactory::identify($inputFileName); $reader = IOFactory::createReader($inputFileType); $reader->setReadDataOnly(true); $spreadsheet = $reader->load($inputFileName);
$spreadsheet->setActiveSheetIndex(1);
$writer = IOFactory::createWriter($spreadsheet, "Xlsx"); $writer->save("template-test.xlsx");
1.18.0
Answer
questions
ovgp
Correct... none of the Readers support dynamic tables like pivot tables. That is something we are currently investigating
Thanks in advance. I think it's a very important function because I need to integrate with some softwares, for example, Microsoft Dynamics NAV (from Rapid Start).
I need to use https://products.aspose.app/cells/editor to keep Dynamic Tables.
Are you working on that? It will take long time?
Thanks in advance.
Related questions