Example #1
0
 /**
  * Write comment to XML format
  *
  * @param 	PHPExcel_Shared_XMLWriter		$objWriter 			XML Writer
  * @param	string							$pCellReference		Cell reference
  * @param 	PHPExcel_Comment				$pComment			Comment
  * @param	array							$pAuthors			Array of authors
  * @throws 	Exception
  */
 public function _writeComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null, $pAuthors = null)
 {
     // comment
     $objWriter->startElement('comment');
     $objWriter->writeAttribute('ref', $pCellReference);
     $objWriter->writeAttribute('authorId', $pAuthors[$pComment->getAuthor()]);
     // text
     $objWriter->startElement('text');
     $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $pComment->getText());
     $objWriter->endElement();
     $objWriter->endElement();
 }