Code Example:
string fullPath = Path.Combine(Server.MapPath("~/temp"), file); byte[] fileByteArray = System.IO.File.ReadAllBytes(fullPath); System.IO.File.Delete(fullPath); return File(fileByteArray, "application/vnd.ms-excel", file); |
We have prepared the sample for the same. The sample can be downloaded from following link.
Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/XlsioExample994700578
Please let us know if you have any concerns.
Regards,