Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Comments.php
private function writeVMLComment(XMLWriter $objWriter, $pCellReference, Comment $pComment)
    {
        // Metadata
        list($column, $row) = Coordinate::coordinateFromString($pCellReference);
        $column = Coordinate::columnIndexFromString($column);
        $id = 1024 + $column + $row;
        $id = substr($id, 0, 4);

        // v:shape
        $objWriter->startElement('v:shape');
        $objWriter->writeAttribute('id', '_x0000_s' . $id);
        $objWriter->writeAttribute('type', '#_x0000_t202');
        $objWriter->writeAttribute('style', 'position:absolute;margin-left:' . $pComment->getMarginLeft() . ';margin-top:' . $pComment->getMarginTop() . ';width:' . $pComment->getWidth() . ';height:' . $pComment->getHeight() . ';z-index:1;visibility:' . ($pComment->getVisible() ? 'visible' : 'hidden'));
        $objWriter->writeAttribute('fillcolor', '#' . $pComment->getFillColor()->getRGB());
        $objWriter->writeAttribute('o:insetmode', 'auto');

        // v:fill
        $objWriter->startElement('v:fill');
        $objWriter->writeAttribute('color2', '#' . $pComment->getFillColor()->getRGB());
        $objWriter->endElement();

        // v:shadow
        $objWriter->startElement('v:shadow');
        $objWriter->writeAttribute('on', 't');
        $objWriter->writeAttribute('color', 'black');
        $objWriter->writeAttribute('obscured', 't');
        $objWriter->endElement();

        // v:path
        $objWriter->startElement('v:path');
        $objWriter->writeAttribute('o:connecttype', 'none');
        $objWriter->endElement();

        // v:textbox
        $objWriter->startElement('v:textbox');
        $objWriter->writeAttribute('style', 'mso-direction-alt:auto');

        // div
        $objWriter->startElement('div');
        $objWriter->writeAttribute('style', 'text-align:left');
        $objWriter->endElement();

        $objWriter->endElement();

        // x:ClientData
        $objWriter->startElement('x:ClientData');
        $objWriter->writeAttribute('ObjectType', 'Note');

        // x:MoveWithCells
        $objWriter->writeElement('x:MoveWithCells', '');

        // x:SizeWithCells
        $objWriter->writeElement('x:SizeWithCells', '');

        // x:AutoFill
        $objWriter->writeElement('x:AutoFill', 'False');

        // x:Row
        $objWriter->writeElement('x:Row', ($row - 1));

        // x:Column
        $objWriter->writeElement('x:Column', ($column - 1));

        $objWriter->endElement();

        $objWriter->endElement();
    }
private function writeVMLComment(XMLWriter $objWriter, $pCellReference, Comment $pComment)
    {
        // Metadata
        list($column, $row) = Coordinate::coordinateFromString($pCellReference);
        $column = Coordinate::columnIndexFromString($column);
        $id = 1024 + $column + $row;
        $id = substr($id, 0, 4);

        // v:shape
        $objWriter->startElement('v:shape');
        $objWriter->writeAttribute('id', '_x0000_s' . $id);
        $objWriter->writeAttribute('type', '#_x0000_t202');
        $objWriter->writeAttribute('style', 'position:absolute;margin-left:' . $pComment->getMarginLeft() . ';margin-top:' . $pComment->getMarginTop() . ';width:' . $pComment->getWidth() . ';height:' . $pComment->getHeight() . ';z-index:1;visibility:' . ($pComment->getVisible() ? 'visible' : 'hidden'));
        $objWriter->writeAttribute('fillcolor', '#' . $pComment->getFillColor()->getRGB());
        $objWriter->writeAttribute('o:insetmode', 'auto');

        // v:fill
        $objWriter->startElement('v:fill');
        $objWriter->writeAttribute('color2', '#' . $pComment->getFillColor()->getRGB());
        $objWriter->endElement();

        // v:shadow
        $objWriter->startElement('v:shadow');
        $objWriter->writeAttribute('on', 't');
        $objWriter->writeAttribute('color', 'black');
        $objWriter->writeAttribute('obscured', 't');
        $objWriter->endElement();

        // v:path
        $objWriter->startElement('v:path');
        $objWriter->writeAttribute('o:connecttype', 'none');
        $objWriter->endElement();

        // v:textbox
        $objWriter->startElement('v:textbox');
        $objWriter->writeAttribute('style', 'mso-direction-alt:auto');

        // div
        $objWriter->startElement('div');
        $objWriter->writeAttribute('style', 'text-align:left');
        $objWriter->endElement();

        $objWriter->endElement();

        // x:ClientData
        $objWriter->startElement('x:ClientData');
        $objWriter->writeAttribute('ObjectType', 'Note');

        // x:MoveWithCells
        $objWriter->writeElement('x:MoveWithCells', '');

        // x:SizeWithCells
        $objWriter->writeElement('x:SizeWithCells', '');

        // x:AutoFill
        $objWriter->writeElement('x:AutoFill', 'False');

        // x:Row
        $objWriter->writeElement('x:Row', ($row - 1));

        // x:Column
        $objWriter->writeElement('x:Column', ($column - 1));

        $objWriter->endElement();

        $objWriter->endElement();
    }
Write VML comment to XML format.

@param XMLWriter $objWriter XML Writer
@param string $pCellReference Cell reference, eg: 'A1'
@param Comment $pComment Comment