导出到Excel只在magento面板pipe理中选定的行

我有个问题。 如何仅将网格中选定的行导出为CSV或Excel文件?

public function exportCsvAction() { $fileName = 'Summary_employe_export.csv'; $content = $this->getLayout()->createBlock('monogo_harvest/adminhtml_summaryEmployee_edit_dayHarvest')->getCsv(); $this->_prepareDownloadResponse($fileName, $content); } public function exportExcelAction() { $fileName = 'Summary_Employe_export.xls'; $content = $this->getLayout()->createBlock('monogo_harvest/adminhtml_summaryEmployee_edit_dayHarvest')->getExcelFile(); $this->_prepareDownloadResponse($fileName, $content); } //Grid $this->addExportType('*/*/exportCsv', Mage::helper('monogo_workmanagement')->__('CSV')); $this->addExportType('*/*/exportExcel', Mage::helper('monogo_workmanagement')->__('Excel')); 

在这里输入图像说明