FriendsOfCake/cakephp-csvview

Store at a path

sahadatfci opened this issue · 4 comments

I was successfully able to export csv but, I want to save this csv file at a path.
Lets Say: If csv file name is test.csv then I want to save this file in webroot/files/csv/.

How can I do this job with this plugin?

Hello,

Anyone please let us know ,if this functionality exists in this plugin or not?
And if not then how to store the csv file on specific path?

You can call render manually and then save the output to a file. This isn't a feature of the plugin itself, but rather something you can do with cakephp's view layer. Please refer to the cakephp documentation for more details.

@josegonzalez sorry to zombie an old issue, but wondering if you can give some more pointers on this? I can render normal controller views into a variable easy enough, but I have no idea how to get /View/CsvView.php to manually render it's output into a variable.

I managed to get this working. I've posted my solution to the CakePHP forum:
http://discourse.cakephp.org/t/sending-csvview-output-as-an-email-attachment/397