Hi John,
I've done a controller to export to several formats. Each action creates the file in a specific formts and in the end I just do:
exit(); Probably is not the best way, but also works fine. Regards, Filipe Carvalho monk.e.boy wrote:
OK, I kinda figured this out. I change the Layout in the model layer: $this->_helper->layout->setLayout('layout-excel'); created a layout file called layout-excel.phtml which writes the corrected header and the contents of the page. Hope that helps the hive mind. monk.e.boy monk.e.boy wrote:Hi, I want to be able to write out an excel document. I have a table of data which can be exported as Excel/CSV, so the user click on the 'export' link which passes a GET parameter to the page. How do I change the view to output CSV rather than HTML? I am using: Zend_Layout::startMvc(array('layoutPath'=>'../application/layouts')); in my bootstrap. Should I use the same view to output either (HTML Report || CSV)? Should these be in different views?How do I remove the 'layout' from within the view layer? I don't want tochange the bootstrap file because 100s of pages all use 'layout' and work fine. Shouldn't the choice to use it or not to use it be made in the View layer? I have no idea how to approach this :-) so any help or pointers will be appreciated :-) monk.e.boy
smime.p7s
Description: S/MIME Cryptographic Signature
