Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); if (xlApp == null) { return false; } int FormatNum;//保存excel文件的格式 string Version;//excel版本号 Version = xlApp.Version;//获取你使用的excel 的版本号 if (Convert.To
Public Sub downLoadFile(ByVal fPath As String) Dim fileInfo As System.IO.FileInfo = New System.IO.FileInfo(fPath) Response.Clear() Response.AddHeader("content-disposition", "attachment;filename=" + Server.UrlEncode(fileInfo.Name.ToStri