title: While open excel file getting error
body: <p>I have an excel file attachment and try to send an email. I'm able to send an email successfully, but I'm getting an error while opening the attached excel file which is given below:</p>
  
  <p>error :- </p>
  
  <pre><code>"Excel cannot open the file "test.xlsx" because the file format or file extension is not valid. 
  Verify that the file has not been corrupted and that the file extension matches the format of the file." 
  </code></pre>
  
  <p>Code:-</p>
  
  <pre><code>$WRKDIR="/tmp/xpyt/"
  $EXCEL_FILE="test.xlsx"
  $EMAIL_FROM="xxx@in.imk.com"
  $EMAIL_TO="yyy@in.imk.com"
  $EMAIL_SUBJECT="Excel Report"
  $EMAIL_TYPE="multipart/mixed"
  
  
  $msg = MIME::Lite-&gt;new(
      From    =&gt; $EMAIL_FROM,
      To      =&gt; $EMAIL_TO,
      Subject =&gt; $EMAIL_SUBJECT,
      Type    =&gt; $EMAIL_TYPE,
  );
  
  $msg-&gt;attach(
      Type     =&gt; 'TEXT',
      Data     =&gt; "Here's the excel file you wanted"
  );
  
  chmod 0755, $EXCEL_FILE_PATH;
  
  $msg-&gt;attach(
      Type     =&gt; 'application/vnd.ms-excel',
      Path     =&gt; $WRKDIR,
      Filename =&gt; $EXCEL_FILE,
      Disposition =&gt; 'attachment'
  );
  
  $msg-&gt;send();
  </code></pre>
  
  <p>Any help will be appreciated.</p>