title: PHPSpreadsheet/XLSX: how to hide comments by default in LibreOffice
body: <p>I am trying to create a comment in a XLSX worksheet using PHPSpreadsheet. Everything works fine except for the fact that there seems to be no way to make the comment start hidden by default - when I open the generated Excel file in LibreOffice, all comments are shown. The <code>Comment</code> class does have a <code>setVisible</code> method, but it seems to be ignored.</p>
  
  <p>I'm using PHPSpreadsheet 1.9.0 via Composer.</p>
  
  <p>Full example:</p>
  
  <pre><code>require ('vendor/autoload.php');
  
  use PhpOffice\PhpSpreadsheet\IOFactory;
  use PhpOffice\PhpSpreadsheet\Spreadsheet;
  
  $excel = new Spreadsheet();
  $ws = $excel-&gt;getActiveSheet();
  $ws-&gt;setCellValue('A1', 'Hello');
  $ws-&gt;getComment('A1')-&gt;getText()-&gt;createTextRun("This is a comment");
  $ws-&gt;getComment('A1')-&gt;setVisible(false);
  $writer = IOFactory::createWriter($excel, 'Xlsx');
  $writer-&gt;save('test-comments.xlsx');
  
  </code></pre>
  
  <p>The comment in A1 should (in theory) start hidden, but it is shown by default.</p>
  
  <p>Edit - Some additional info. The comments do start hidden in Excel, so this might point to some problem with LibreOffice. However, if you hide the comment in LibreOffice, save back to XLSX and reopen, the comment does start out hidden - so apparently it's some kind of incompatibility between the way PHPSpreadsheet writes out the comment and how LibreOffice expects it to be. I have filed a bug against Libreoffice Calc (<a href="https://bugs.documentfoundation.org/show_bug.cgi?id=128447" rel="nofollow noreferrer">#128447</a>).</p>