Re: Export to CSV using Helper, resulting error

2009-11-25 Thread FrederickD
I just had a similar problem and post here:
http://groups.google.com/group/cake-php/browse_thread/thread/f9d8203a3acb0e8f#.

I solved the issue a few hours ago using this approach:
http://www.dnamique.com/cakephp-export-data-to-excel-the-easy-way/. No
helper needed. It was done in 15 minutes. I could not believe it. I
was even able to access the action in CakePHP from a button on an
ExtJS grid.

I would highly recommend taking a look at this approach. It is the
simplest approach I have found, and a very clear explanation.

Hopefully it helps...

On Nov 24, 10:03 pm, E T codeb...@gmail.com wrote:
 Hi all,

 I am trying to put a download link on one of my view, so when user click on
 that link it will automatically generate a csv file and pop up for user to
 download.

 I followed the instruction 
 herehttp://blog.allmythingstodo.com/tag/cakephp/usingthe helper from Adam
 Royle (http://bakery.cakephp.org/articles/view/csv-helper-php5)

 However, when I click on my link.. this is shown:

 Notice (8): Undefined variable: csv
 [APP\controllers\dispatches_controller.php, line 158]

 Fatal error: Call to a member function addRow() on a non-object in
 C:\xampp\htdocs\cake\app\controllers\dispatches_controller.php on line 158

 Please help. Thank you.
 **

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Export to CSV using Helper, resulting error

2009-11-25 Thread E T
Hi FrederickD,

The new approach works really well. Thank you for your help :D

On Thu, Nov 26, 2009 at 12:03 PM, FrederickD
manzanillo.engl...@gmail.comwrote:

 I just had a similar problem and post here:

 http://groups.google.com/group/cake-php/browse_thread/thread/f9d8203a3acb0e8f#
 .

 I solved the issue a few hours ago using this approach:
 http://www.dnamique.com/cakephp-export-data-to-excel-the-easy-way/. No
 helper needed. It was done in 15 minutes. I could not believe it. I
 was even able to access the action in CakePHP from a button on an
 ExtJS grid.

 I would highly recommend taking a look at this approach. It is the
 simplest approach I have found, and a very clear explanation.

 Hopefully it helps...

 On Nov 24, 10:03 pm, E T codeb...@gmail.com wrote:
  Hi all,
 
  I am trying to put a download link on one of my view, so when user click
 on
  that link it will automatically generate a csv file and pop up for user
 to
  download.
 
  I followed the instruction herehttp://
 blog.allmythingstodo.com/tag/cakephp/usingthe helper from Adam
  Royle (http://bakery.cakephp.org/articles/view/csv-helper-php5)
 
  However, when I click on my link.. this is shown:
 
  Notice (8): Undefined variable: csv
  [APP\controllers\dispatches_controller.php, line 158]
 
  Fatal error: Call to a member function addRow() on a non-object in
  C:\xampp\htdocs\cake\app\controllers\dispatches_controller.php on line
 158
 
  Please help. Thank you.
  **

 Check out the new CakePHP Questions site http://cakeqs.org and help others
 with their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Export to CSV using Helper, resulting error

2009-11-25 Thread Braindead
The problem with this approach is that Excel tries to parse certain
values. Just to mention one example: 1-10 will be converted to 01.
Oct.
I prefer the following approach from the bakery:
http://bakery.cakephp.org/articles/view/excel-xls-helper

Markus

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Export to CSV using Helper, resulting error

2009-11-24 Thread E T
Hi all,

I am trying to put a download link on one of my view, so when user click on
that link it will automatically generate a csv file and pop up for user to
download.

I followed the instruction here
http://blog.allmythingstodo.com/tag/cakephp/using the helper from Adam
Royle (
http://bakery.cakephp.org/articles/view/csv-helper-php5)

However, when I click on my link.. this is shown:

Notice (8): Undefined variable: csv
[APP\controllers\dispatches_controller.php, line 158]

Fatal error: Call to a member function addRow() on a non-object in
C:\xampp\htdocs\cake\app\controllers\dispatches_controller.php on line 158

Please help. Thank you.
**

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en