Anybody see a problem with the way I'm triying to print these columns out using PEAR/Excel? $result is populated -- I made sure with print_r.
$rows = 0;
$cols = 0;
$rows = mysql_num_rows ($result);
$cols = mysql_num_fields ($result);
$colNames = array();
for ($col = 0; $col < $cols; $col++)
{
$colNames[col] = mysql_field_name($result, $col);
}
// Add all the column headings with a single call
// leaving a blank row to look nicer
$sheet->writeRow(5,0,$colNames,$colHeadingFormat);
$colHeadingFormat2 =& $xls->addFormat();
$colHeadingFormat2->setFontFamily('Helvetica');
$colHeadingFormat2->setSize('10');
$colHeadingFormat2->setAlign('center');
for ($row = 0; $row < $rows; $row++)
{
$rs = mysql_fetch_row ($result);
for ($col = 0; $col < $cols; $col++)
{
$sheet->write($row+6,$col,$rs[$col],$colHeadingFormat2);
}
}