Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- byte[] byteInfo = workbook.SaveToMemory(FileFormat.OpenXMLWorkbookMacroEnabled);
- workStream.Write(byteInfo, 0, byteInfo.Length);
- workStream.Position = 0;
- return workStream;
- byte[] byteInfo = workbook.SaveToMemory(FileFormat.OpenXMLWorkbookMacroEnabled);
- void StreamExcelFile(byte[] bytes)
- {
- Response.Clear();
- Response.ContentType = "application/force-download";
- Response.AddHeader("content-disposition", "attachment; filename=name_you_file.xls");
- Response.BinaryWrite(bytes);
- Response.End();
- }
Add Comment
Please, Sign In to add comment