Hi,
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....

Member Avatar for diafol

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.

Member Avatar for diafol

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

In Excel I need it.

Member Avatar for diafol

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 `m exporting in EXCEL file only

Member Avatar for diafol

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/

Thank you for your kind effort

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.