See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]
1 <?php 2 3 namespace PhpOffice\PhpSpreadsheet\Writer\Ods\Cell; 4 5 use PhpOffice\PhpSpreadsheet\Cell\Cell; 6 use PhpOffice\PhpSpreadsheet\Shared\XMLWriter; 7 8 /** 9 * @category PhpSpreadsheet 10 * 11 * @copyright Copyright (c) 2006 - 2015 PhpSpreadsheet (https://github.com/PHPOffice/PhpSpreadsheet) 12 * @author Alexander Pervakov <frost-nzcr4@jagmort.com> 13 */ 14 class Comment 15 { 16 public static function write(XMLWriter $objWriter, Cell $cell) 17 { 18 $comments = $cell->getWorksheet()->getComments(); 19 if (!isset($comments[$cell->getCoordinate()])) { 20 return; 21 } 22 $comment = $comments[$cell->getCoordinate()]; 23 24 $objWriter->startElement('office:annotation'); 25 $objWriter->writeAttribute('svg:width', $comment->getWidth()); 26 $objWriter->writeAttribute('svg:height', $comment->getHeight()); 27 $objWriter->writeAttribute('svg:x', $comment->getMarginLeft()); 28 $objWriter->writeAttribute('svg:y', $comment->getMarginTop()); 29 $objWriter->writeElement('dc:creator', $comment->getAuthor()); 30 $objWriter->writeElement('text:p', $comment->getText()->getPlainText()); 31 $objWriter->endElement(); 32 } 33 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body