title: CSV not to be exported in Magento
body: <p>I have set the following Code within WebController.php</p>
  
  <pre><code>/**
  * Export order grid to CSV format
  */
  public function exportCsvAction()
  {
      $fileName = sprintf('stores-%s.csv', date('Ymd'));
      $grid = $this-&gt;getLayout()-&gt;createBlock('adminhtml/web_web_grid');
      $this-&gt;_prepareDownloadResponse($fileName, $grid-&gt;getCsvFile());
  }
  </code></pre>
  
  <p>I don't know what is the problem that causing CSV not to be exported.</p>
  
  <p>Following error is showing -</p>
  
  <pre><code>Fatal error: Call to a member function getCsvFile() on a non-object in
  /var/www/projects/tmp/storelocator/app/code/local/Company/Web/controllers/Adminhtml/WebController.php
  on line 0
  </code></pre>
  
  <p>Please help!
  Thanks in Advance.</p>