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…
添加如下注册表 Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security] "ExtensionHardening"=dword: 存成.reg,然后双击导入到注册表中…
一:从字符串总分离文件路径.命名.扩展名,上图 二:代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace FilePathString { public par…