Jump to content

Problem with csv creation


Recommended Posts

Hello,

 

I have created a custom module that creates a csv from prestashop data. I use the code below:

------

header('Content-Type: text/csv; charset=utf-8');

header('Content-Disposition: attachment; filename=data.csv');

 

fputcsv($output, array('Column 1', 'Column 2', 'Column 3','Column 4','Column 5','Column 6'));

fclose($output);

-----

 

The generated csv including all the data that i want, but the csv also including some extra code that i don't want.

 

I am attaching the csv in order to see yourself what i mean.

 

Any ideas to avoid these extra data included?

 

Thank you

datademo.csv.zip

Edited by wiseprt (see edit history)
Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...