[snip] I'm using MySQL Jay I can present the results in a table easy enough and if I replace the TD TAGs with commas etc. I get a screen output that resembles a CSV file but need to go that one step further and don't know how... [/snip]
Use CSV (without the table thing) and place Excel header definitions in the script.... header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: inline; filename=\"excel.xls\""); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); and then an example from one of our spreadsheet outputs.... print($rowage->TmsNoLines . ","); print($rowage->TmsStatus . ","); print($rowage->TmsPaidDate . ","); print(number_format($rowage->Current, 2, '.', '') . ","); print(number_format($rowage->Thirty, 2, '.', '') . ","); print(number_format($rowage->Sixty, 2, '.', '') . ","); print(number_format($rowage->Ninety, 2, '.', '') . ","); print(number_format($rowage->OneTwenty, 2, '.', '') . ",\n"); We usually make the link open in a new window when outputting sheets like this. All the user needs to do is save it locally at that poiint. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php