Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ExportSoldExcel.php
Go to the documentation of this file.
1 <?php
8 
12 
14 {
20  const ADMIN_RESOURCE = 'Magento_Reports::report_products';
21 
27  public function execute()
28  {
29  $this->_view->loadLayout();
30  $fileName = 'products_ordered.xml';
32  $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
33  return $this->_fileFactory->create(
34  $fileName,
35  $exportBlock->getExcelFile($fileName),
37  );
38  }
39 }
$fileName
Definition: translate.phtml:15