by clicking history of book, I show all book details in textbox and student details(only limited columns) in table format(which student took that particular book), Now I want to export in excel file.I am new to this concept. How to do? with examples....

Edited by AntonyRayan

3 Years
Discussion Span
Last Post by AntonyRayan

Have a think about what you're actually asking for and read this: http://bit.ly/Dwebphp

This makes very little sense. No idea what table you're talking about. HTML, DB?


ok sorry for inconvinience, I need to take wxport file from db to excel file for selected fields.


No inconvenience, just difficult to know what you were trying to do. So your export file - in which format is it? csv?


Yes I realise Excel - but in which format are you exporting? csv? Unless you use a third-party plugin you will not create a "real" Excel file, but you can create a csv (comma separated values) file which excel can read.


I don't seem to be making myself understood. You can read data from a database and on the basis of the resulting array (or object), transform it to XML, JSON, YAML, CSV etc. What you won't be able to do is create a bona fide Excel (xlsx or xls) file. Unless, that is, you use a third party script.

MySQL has an add-in for Excel that allows you to import data into it from MySQL DBs: http://www.mysql.com/why-mysql/windows/excel/

However, this would not be suitable for your users, so you're looking at the opposite functionality - producing an Excel file from MySQL output.

PHPExcel may be worth a look: https://phpexcel.codeplex.com/

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.