/ Published in: PHP
Expand |
Embed | Plain Text
<? // Connect database. $dbhost = ''; //Host Name $dbuser = ''; //DB User $dbpass = ''; //DB password $dbname = ''; // DB Name // Get data records from table. $filter = $_GET['ev']; // Functions for export to excel. function xlsBOF() { return; } function xlsEOF() { return; } function xlsWriteNumber($Row, $Col, $Value) { return; } function xlsWriteLabel($Row, $Col, $Value ) { echo $Value; return; } xlsBOF(); /* Make a top line on your excel sheet at line 1 (starting at 0). The first number is the row number and the second number is the column, both are start at '0' */ xlsWriteLabel(0,0,"Title"); //Top Title // Make column labels. (at line 3) xlsWriteLabel(2,0,"Row Name"); // Row Name $xlsRow = 3; // Put data records from mysql by while loop. xlsWriteLabel($xlsRow,0,$row['']); //Each DB Row $xlsRow++; } xlsEOF(); ?>
You need to login to post a comment.
