try
{
//删除临时上传的Excel文件
if (System.IO.File.Exists(path))
{
FileInfo fi = new FileInfo(path);
if (fi.Attributes.ToString().IndexOf("ReadOnly") != -1)
fi.Attributes = FileAttributes.Normal;
System.IO.File.Delete(path);
}
}
catch { }