Welcome Guest, Not a member yet? Register   Sign In
Best CSV exporter?
#1

[eluser]GeXus[/eluser]
Would anyone recommend a good library for CSV export? Ideally, it could take a result, format it, and spit it out to download.

Thanks!
#2

[eluser]CroNiX[/eluser]
Different than the one built in? (assuming you want to take a db result and turn it into csv)

http://ellislab.com/codeigniter/user-gui...s.html#csv
#3

[eluser]GeXus[/eluser]
Hey.. thanks actually that's perfect Smile

Any idea how to have the CSV prompt to download? When I redirect to the CSV file, it displays it in the browser.
#4

[eluser]CroNiX[/eluser]
yeah, you need to send a different header if you don't want the browser to parse the content.

Try sending (using the real filename) just before you output it:
header('Content-disposition: attachment; filename=filename_of_your_csv.csv');
header('Content-type: text/csv');
#5

[eluser]GeXus[/eluser]
Awesome, thank you!




Theme © iAndrew 2016 - Forum software by © MyBB