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

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -