title: Download Excel file from Nano httpd web server
body: <p>I have an excel file in my Android phone whereby i want to download this file by Nano Httpd web server,I am reading excel content and return as a Nanohttpd's response :</p>
  <pre><code>File excelDirectory = new File(GenericContext.getContext().getFilesDir(), &quot;logsFile&quot;);
  FileInputStream fis = new FileInputStream(excelDirectory + File.separator + &quot;1.xlsx&quot;);
  return newChunkedResponse(Response.Status.OK, NanoHTTPD.MIME_PLAINTEXT, fis);
  </code></pre>
  <p>and in web server(in ajax success block) i have written this code to download:</p>
  <pre><code>var blob = new Blob([result],{type: 'application/vnd.openxmlformats-  officedocument.spreadsheetml.sheet;charset=utf-8'});
  var downloadObj = document.createElement('a');
  var href = window.URL.createObjectURL(blob);
  downloadObj.href = href;
  downloadObj.download = '1.xlsx';
  document.body.appendChild(downloadObj);
  downloadObj.click();
  document.body.removeChild(downloadObj);
  window.URL.revokeObjectURL(href);
  </code></pre>
  <p>when i use console.log() to print the result, the content of excel is not correct.I should mention this file can not be opened by any excel tools.</p>