title: Generating an excel file in mason from a bytebuffer
body: <p>I have some mason code that calls my backend service, which returns the bytebuffer representation of the excel workbook I wish to generate. In writing the excel file, I end up with an excel file full of gibberish (presumably the bytebuffer itself). This is how I'm writing out the file (where $response is the bytebuffer returned by my backend service):</p>
  
  <pre><code>$m-&gt;clear_buffer();
  setHeader('content-type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  setHeader('Content-Disposition', attachment; filename="packlist.xlsx");
  WPHTTPResponse::write($response);
  $m-&gt;abort();
  </code></pre>
  
  <p>I know my function is being called and that it is returning an object, but I don't know where it is going wrong in writing. Am I missing a step or did I write something incorrectly? Any ideas?</p>
  
  <p>Much appreciated</p>