ProLoser / CakePHP-CSV

A component that will import/export data from a csv file into a save-friendly nested model data array format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I am unable to Export CSV it is returning false

sagarguhe opened this issue · comments

I am trying to Export a file at a custom location in a webroot directory, for that purpose I am using $this->Csv->export($path, $data); but this method is returning 'False'. Do I need to create a Csv file in order to export data or the export method itself creates the file and exports data?

Please suggest the steps to rectify this problem. Thanks

Are you using the component or service?

I am using Component...

Check folder write permissions or perhaps check your logs with debugging enabled?

Do I need to mention the file name or just a path where the new file will be created automatically by the plugin? I didn't find any permission related error log in app/tmp/error.log.

What I am doing is creating a folder named by user id and passing that new path the the export() method. And I aslo tried passing name with .csv extension followed by path of the file that needs to be created and stored at that path.

Am I doing anything wrong?

You'd have to show me some code.