"Removed Feature: Hyperlinks"

Topics: Developer Forum
Jul 26, 2011 at 9:09 PM

Hi,

I have generated this spreadsheet for a client.  It opens fine for me on Excel 2011 for Mac, but my client is using Excel 2007 for Windows and is receiving the error message below.  He says this results in the hyperlinks not working on the effected sheets.  

My code:

$hyperlinkStyle = array(
	'underline' => PHPExcel_Style_Font::UNDERLINE_SINGLE,
	'color'	 => array(
		'rgb' => '0000ff'
	)
);
$object->getActiveSheet()->SetCellValue($column.($row), 'PDF'); 
$object->getActiveSheet()->getCell($column.($row))->getHyperlink()->setUrl($this->cleanup(pdf_path($pdf, get_class($this)))); 
$object->getActiveSheet()->getStyle($column.($row))->applyFromArray($hyperlinkStyle); 
$object->getActiveSheet()->getStyle($column.($row))->getFont()->applyFromArray($hyperlinkStyle);

(I don't remember why I have both of those last rows; they seem redundant)

The error:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
  <logFileName>error047240_01.xml</logFileName>
  <summary>Errors were detected in file 'C:\Users\Sales Admin\Downloads\public_notices (2).xlsx'</summary>
- <additionalInfo>
  <info>Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.</info>
  </additionalInfo>
- <repairedParts summary="Following is a list of repairs:">
  <repairedPart xml:space="preserve">Repaired Part: /xl/worksheets/sheet1.xml part.</repairedPart>
  <repairedPart xml:space="preserve">Repaired Part: /xl/worksheets/sheet4.xml part.</repairedPart>
  </repairedParts>
- <removedFeatures summary="Following is a list of removed features:">
  <removedFeature>Removed Feature: Hyperlinks from /xl/worksheets/sheet1.xml part</removedFeature>
  <removedFeature>Removed Feature: Hyperlinks from /xl/worksheets/sheet4.xml part</removedFeature>
  </removedFeatures>
  </recoveryLog>

 

Jul 28, 2011 at 1:03 PM

At first look, Excel 2007 don't like urls with space and remove all hyperlinks in the sheet. Perhaps you can try to urlencode yours links.