2017-02-17 46 views

回答

1

你需要做一個緩衝區,然後設置的答覆

let buf = new Buffer(xls, 'binary'); 

return reply(buf) 
    .encoding('binary') 
    .type('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') 
    .header('content-disposition', `attachment; filename=test-${new Date().toISOString()}.xlsx;`); 
頭和編碼