hola, te dejo lo que yo ocupo con esta librería
$objPHPExcel->removeSheetByIndex(0);
$index =0;
data($objPHPExcel,$index,"Data");
$index++;
missing($objPHPExcel,$index,"Utilization");
$index++;
canceled($objPHPExcel,$index,$title);
$index++;
unsuc($objPHPExcel,$index,$Unsuccess);
$index++;
activity($objPHPExcel,$index,"Activity");
luego las mandas llamar y llenas tu info
function data($objPHPExcel,$index,$title)
{
global $ip,$connection;
$currentSheet= createSheet($objPHPExcel);
$currentSheet= $objPHPExcel->getSheet($index);
$currentSheet->setTitle($title);
$currentSheet ->setCellValue('A1', 'Team')
->setCellValue('B1', 'Successful')
->setCellValue('C1', 'Unsuccessful')
->setCellValue('D1', 'Signum')
->setCellValue('E1', 'Week')
->setCellValue('F1', 'Sum of Productive')
->setCellValue('G1', 'Sum of Non-Productive')
->setCellValue('H1', 'Team')
->setCellValue('I1', 'LM')
->setCellValue('J1', 'Resource Name')
->setCellValue('K1', 'signum');
$currentSheet->getColumnDimension('A')->setWidth(20);
$currentSheet->getColumnDimension('B')->setWidth(15);
$currentSheet->getColumnDimension('C')->setWidth(15);
$currentSheet->getColumnDimension('D')->setWidth(15);
$currentSheet->getColumnDimension('E')->setWidth(15);
$currentSheet->getColumnDimension('F')->setWidth(20);
$currentSheet->getColumnDimension('G')->setWidth(30);
$currentSheet->getColumnDimension('H')->setWidth(20);
$currentSheet->getColumnDimension('I')->setWidth(40);
$currentSheet->getColumnDimension('J')->setWidth(40);
$currentSheet->getColumnDimension('K')->setWidth(15);
$currentSheet->getStyle("H1:K1")->getFont()->setBold(false)->getColor()->setRGB('FFFFFF');
setBackground($objPHPExcel,$index,'H','K',1,0,1);
setBackground($objPHPExcel,$index,'H','K',2,0,2);
$currentSheet->getStyle("D1:G1")->getFont()->setBold(false)->getColor()->setRGB('FFFFFF');
setBackground($objPHPExcel,$index,'D','G',1,0,1);
setBackground($objPHPExcel,$index,'D','G',2,0,2);
$currentSheet->getStyle("A1:C1")->getFont()->setBold(false)->getColor()->setRGB('FFFFFF');
setBackground($objPHPExcel,$index,'A','C',1,0,1);
setBackground($objPHPExcel,$index,'A','C',2,0,2);
////Successful
$query="exec [RIA].[dbo].[Test_Rachel] 2, '".$ip."','','Successful'";
$r3=odbc_exec($connection,$query);
while(odbc_fetch_row($r3)){
$TotalS =odbc_result($r3,"Total");
$currentSheet ->setCellValue('A2', 'Integration C4');
$currentSheet ->setCellValue('B2', odbc_result($r3,"Total"));
}
///UnSuccesful
$query="exec [RIA].[dbo].[Test_Rachel] 2, '".$ip."','','Unsuccessful'";
$r3=odbc_exec($connection,$query);
while(odbc_fetch_row($r3)){
$TotalS =odbc_result($r3,"Total");
$currentSheet ->setCellValue('C2', odbc_result($r3,"Total"));
}
/////
$sql="exec [RIA].[dbo].[Test_Rachel] 1, '".$ip."','Integration C4',''";
$rs=odbc_exec($connection,$sql);
$ii=0;
while(odbc_fetch_row($rs)){
$aux=2+$ii;
if($aux%2==0){
setBackground($objPHPExcel,$index,'H','K',$aux,0,2);
}
$currentSheet
->setCellValue('H'.$aux, odbc_result($rs,"team"))
->setCellValue('I'.$aux, odbc_result($rs,"lmName"))
->setCellValue('J'.$aux, odbc_result($rs,"name"))
->setCellValue('K'.$aux, odbc_result($rs,"signum"));
$ii++;
}
$sql4="exec [RIA].[dbo].[Test_4] '".$ip."','1' ";
$rs4=odbc_exec($connection,$sql4);
$ii=0;
while(odbc_fetch_row($rs4)){
$aux=2+$ii;
if($aux%2==0){
setBackground($objPHPExcel,$index,'D','G',$aux,0,2);
}
$currentSheet
->setCellValue('D'.$aux, odbc_result($rs4,"signum"))
->setCellValue('E'.$aux, odbc_result($rs4,"week"))
->setCellValue('F'.$aux, odbc_result($rs4,"hours1"))
->setCellValue('G'.$aux, odbc_result($rs4,"hours2"));
$ii++;
}
}
en este caso estoy llenando la primera pestaña que es data...Espero te sirva