php-write-excel

setActiveSheetIndex(0)
        ->setCellValue('A' . $row, $cat_id)
        ->setCellValue('B' . $row, $content_id)
        ->setCellValue('C' . $row, '')
        ->setCellValue('D' . $row, '')
        ->setCellValue('E' . $row, '');
    $row++;
}
                


$objPHPExcel->setActiveSheetIndex(0);
// Save Excel 2007 file
echo date('H:i:s'), " Write to Excel2007 format", EOL;
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', time() . '.xlsx', __FILE__));

你可能感兴趣的:(php-write-excel)