Links disappears if I remove line above them

Topics: Developer Forum
Oct 1, 2010 at 3:05 PM
Edited Oct 1, 2010 at 3:10 PM

Hi , I've got next issue,

I use template line  with placeholders

%%name%%  %%income%% etc

I add pack of new lines below it

$objWorksheet->insertNewRowBefore($cells_info["row"]+1, count($this -> data['affiliates_overview']));

then I put data to each line

foreach ($this -> data['affiliates_overview'] as $row) { //get row 
 foreach ($row as $name => $value) { //get cell
if (!empty($cells_info['cells'][$name])){
$cell_index = $cells_info['cells'][$name]['column'].$row_index;
  if ($name == 'name' && $value != 'TOTAL') { //add name with link
    $objWorksheet->getCell($cell_index)->setValue(preg_replace("/%%.+%%/", $value, $cells_info['cells'][$name]['placeholder']));
     $objWorksheet->getCell($cell_index)->getHyperlink()->setUrl("sheet://'".substr($row->affiliate_." ". $row->name, 0, XML_MAX_TITLE_LENGTH)."'!A1");
  } else {   // add any value
    $objWorksheet->setCellValue($cell_index, preg_replace("/%%.+%%/", $value, $cells_info['cells'][$name]['placeholder']));

do dump and can see links in each line ,  then I remove placeholder line


after this I do dump and there is link only in first line, but if I hide placeholder line


links don't disappear

Is it bug or I do something wrong ? Also getFont()->setUnderline(true) doesn't work too, I can't understand why.