c# - XML Errors using EPPlus to download Excel file in MVC -


here important part, called ajax call in view:

 using (excelpackage pck = new excelpackage())         {             excelworksheet ws = pck.workbook.worksheets.add(filename);             ws.cells["a1"].loadfromdatatable(dt, true);             response.contenttype = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";             response.addheader("content-disposition", "attachment;  filename=" + filename + ".xlsx");             byte[] bytes = pck.getasbytearray();             response.binarywrite(bytes);             response.end();         } 

but creates error: enter image description here

any idea wrong?


Comments

Popular posts from this blog

javascript - Create websocket without connecting -

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

Android SDK Manager freezes after installation of OSX 10.11 El Capitan public Beta -