exporting table structure to Excel files with phpmyadmin

You could run a SELECT ... INTO OUTFILE query along the following lines:

SELECT * INTO OUTFILE '/path/to/my_table_structure.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES  TERMINATED BY '\n'
FROM   INFORMATION_SCHEMA.COLUMNS
WHERE  TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'my_table'

I had the same problem and I achieved with the combination of PHPMyadmin and a chrome plugin. This might not be the straightforward way but it just works. (Assuming you are using Google Chrome)

  • Install Table capture for chrome - https://chrome.google.com/webstore/detail/table-capture/iebpjdmgckacbodjpijphcplhebcmeop/related?hl=en

  • Once the plugin is installed, open PHPmyadmin > DB > table > click on Structure

  • Right cLick on Print View > open in a new tab( this is important as the chrome plugin doesn't work on tables in an iframe)

enter image description here

  • once the print view opens in a new tab, click on the plugin icon in the address bar,

enter image description here

  • Click on the plugin icon and you will be shown options to either copy table to clipboard or export to Google docs.

enter image description here

  • I did a copy and pasted the table into excel. You can also export to google docs.

enter image description here

Note: This is just a workaround and just wanted to share this. Please be easy on comments & TD's :) , and I like the way proposed by eggyal anyways!