zoukankan      html  css  js  c++  java
  • magento表单的导出

     1.Grid.php中得有:
       $this->addExportType('*/*/exportXml' , Mage::helper('hpusernetwork' )->__('Excel XML'));
       $this->addExportType('*/*/exportCsv' , Mage::helper('hpusernetwork' )->__('CSV'));
        相应的controller中的方法是:
       public function exportXmlAction(){
                 $fileName   = 'warehouse_batch_' . date('YmdHis') . '.xml';
                 $content    = $this->getLayout()->createBlock('bf170card/adminhtml_account_index_grid')->getExcelFile();
                 $this->_prepareDownloadResponse($fileName , $content );
          }
          
           public function exportCsvAction(){
                 $fileName = 'warehouse_batch_' . date('YmdHis') . '.csv';
                 $content = $this->getLayout()->createBlock('bf170card/adminhtml_account_index_grid' )->getCsvFile();
                 $this->_prepareDownloadResponse($fileName , $content );
          }

  • 相关阅读:
    原码、反码、补码详解
    进制转换
    目录
    Window【目录】
    排序算法——冒泡排序
    算法的时间复杂度与空间复杂度
    排序算法
    递归—八皇后问题
    递归—迷宫问题
    递归
  • 原文地址:https://www.cnblogs.com/sqsnbrdcwlcfzj/p/6221300.html
Copyright © 2011-2022 走看看