if (excelfile.FileName.EndsWith("xls") || excelfile.FileName.EndsWith("xlsx")) { Excel.Application application = null; Excel.Workbook workbook = null; Excel.Worksheet worksheet = null; Excel.Range range = null; string path = Server.MapPath("/Upload/" + excelfile.FileName);
Error coming from above statement here with Internet Explorer. Its working fine with Chrome
An exception of type 'System.NotSupportedException' occurred in mscorlib.dll but was not handled in user code. The given path's format is not supported.
if (System.IO.File.Exists(path)) System.IO.File.Delete(path); excelfile.SaveAs(path);
System.IO.Path.GetFileName
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)