title: PhpSpreadsheet - Check if file is open
body: <p>I need to check if the excel file is currently open using PHPSpreadsheet.</p>
  
  <p>I thought of a solution by handling this line <code>$writer-&gt;save(file_name)</code> into <code>if else</code> condition but still doesn't work.</p>
  
  <pre><code>if($writer-&gt;save(file_name){
      //file is open
  }else{
      //file is not open
  }
  </code></pre>
  
  <p>What else can I do to solve my problem?</p>