Created
January 25, 2020 19:28
-
-
Save CoreProgramm/1116a58b4a943a08349b08ab294dc5e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Download() | |
{ | |
string Files = "wwwroot/UploadExcel/CoreProgramm_ExcelImport.xlsx"; | |
byte[] fileBytes = System.IO.File.ReadAllBytes(Files); | |
System.IO.File.WriteAllBytes(Files, fileBytes); | |
MemoryStream ms = new MemoryStream(fileBytes); | |
return File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, "employee.xlsx"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment