je peux mettre = MAX (K2, L2, M2, O2, P2, Q2, N2) dans la cellule F2 avec un xlsxwriter pas de problème, mais je ne peux pas l'obtenir pour changer pour chaque ligne (ie = MAX (K2, L2, M2, O2, P2, Q2, N2) dans la cellule F2)PHP pour ajouter une formule à une colonne dans Excel avec xlsxwriter
donc si j'avais mille lignes il irait à (ie = MAX (K1000, L1000, M1000, O1000, p10002, Q2, N1000) en F1000 cellulaire) (bestprice est rangée F)
cela est le code i ai est en PHP 5.3.24
...
$resulted[$y] = array('ISBN' => $isbn,
'Quantity' => $qty,
'Title' => $shortTitle,
'ItemAmount'=>$amount,
'Best'=>$best,
'BestPrice'=> '=MAX(K2,L2,M2,O2,P2,Q2,N2)',
'Difference'=>'=E-H',
'AvaQty'=>$AvaQty,
'LastDate'=>$LastDate,
'LastPrice'=>$LastPrice,
);
$y++;
}
$header = array('ISBN' => 'integer',
'Quantity' => 'integer',
'Title' => 'string',
'Item_Amount'=>'price',
'Best' =>'string',
'BestPrice'=> 'price',
'Difference'=>'price',
'AvaQty'=>'integer',
'LastDate'=>'date',
'LastPrice'=>'price',
);
$col_options=array('widths'=> array(40, 10,40,10));
$writer = new XLSXWriter();
$writer->writeSheetHeader('Name', $header, $col_options);
foreach($resulted as $row)
$writer->writeSheetRow('Name', $row);
$writer->writeToFile("../My".$tracking .".xlsx");