1

I've got a custom table in WordPress and I'd like to be able to export the data in that table as a FILE in CSV (semi-colon seperated) format.

I've got the data coming out properly, but how do I then save it as an attachment?

Keep in mind that when using WordPress, headers have already been set... and I really don't know how to get around that.

1
  • do you mean you used a plugin that generates custom table, and you want to export a table that is generated by that plugin? Commented Oct 3, 2011 at 3:23

3 Answers 3

3

I'm not sure exactly HOW you're doing what you're TRYING to do ...

... but this link gives you a simple, straightforward way to write the data as a .csv file you can do a "save as" from your browser:

http://wordpress.org/support/topic/export-wordpress-db-table-to-excel

Sign up to request clarification or add additional context in comments.

Comments

0

For these plugins, they use database to store row & column details. You have to extract the data in MySQL database tables ( those table names are usually named after the plugin's name ) .

If you are still not sure how to do, you can just copy the table being displayed in page in browser, then paste in Excel. Last, save as CSV or XLS if you like.

Comments

-1

you can use this code. just copy and past and you have it :)

https://gist.github.com/umairidrees/8952054#file-php-save-db-table-as-csv

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.