i am having a button on clicking this i want to generate a exl file having all data values which i ha开发者_如何转开发ve in a table comming from databse..please help me
Have a look at this PEAR package:
Spreadsheet_Excel_Writer
In case you have knowledge of windows technology, have a look at PHP's COM libary:
http://php.net/manual/de/book.com.php
Use a library such as PHPExcel, or one of the alternatives to PHPExcel listed in this thread
EDIT
The answer to this question demonstrates how to do what you're asking: reading data from a database and writing it to Excel
If you just want some simpel columns & rows without any special design
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"export.csv\"");
$data.="col1, col2 ... from your database";
echo $data;
You can import csv into excel.
精彩评论