摘要:--ntext字段的替换处理示例--全表替换 --测试数据 create table test(id varchar(3),txt ntext) insert into test select 1,abc我是中a国人 deaf;sdakj21432 我要处理中文 go -...
阅读全文
摘要:using System; using System.ComponentModel; using System.Windows.Forms; using SQLDMO; using Application = System.Windows.Forms.Application; namespace SQLDMOSample { /**//// /// Summary descri...
阅读全文
摘要:#region SQL数据库导入到Excel表中(运用ADO.NET) /// /// 单表导入Excel单页中 /// /// 表名 /// public static void ExportDataByQueryTableA(string dtname,int index,Label msg) { long totalCount=0; lo...
阅读全文
摘要:如果你要在你的C#程序中控制Windows的任务栏,有两个Windows api 可以帮到你!他们就是 FindWindowA 和 ShowWindow C#中声明如下: using System.Runtime.InteropServices; [DllImport("user32.dll", EntryPoint = "FindWindowA")] public static extern ...
阅读全文
摘要:Microsoft.Office.Interop.Excel命名空间要添加什么引用 在visual Studio 2005命令提示工具中,定位到Excel安装目录,运行“TlbImp EXCEL.EXE”命令,把Excel.exe编译为Excel.dll。这一步会...
阅读全文
摘要:private static string _filePath=string.Empty ; #region Excel导入SQL数据库 /// /// 获取Excel数据表列表 /// /// public static ArrayList GetExcelTables() { //将Excel架构存入数据里 System.Data.DataTabl...
阅读全文
摘要:namespace LiFengguo.ExcelManage { /**//// /// ExcelManage 的摘要说明。 /// public class ExcelManage { public ExcelManage() { } /**//// /// 获取Ex...
阅读全文
摘要:using System; using System.Text; using System.IO; using System.Xml; using System.Data; namespace XmlBook.Com.Sem.Tools { /// /// 版权: Copyright by SEM IT Department /// 版本: 0.0.1 /// 文件: XmlBook.C...
阅读全文
摘要:C#和Asp.net下excel进程一被打开,有时就无法关闭, 尤其是website.对关闭该进程有过GC、release等方法,但这些方法并不是在所有情况下均适用。 于是提出了kill process的方法, 目前我见过的方法多是用进程创建时间筛选excel.exe进程, 然后kill 。 这样的方法是不精确的, 也是不安全的, 通过对网上一些关于Api运用文章...
阅读全文
摘要:private Excel.Application m_objExcel=null; private Excel.Range m_objRange=null; private Excel.Workbooks m_objBooks=null; private Excel._Workbook m_objBook=null; private Excel.Sheets m_objSheet...
阅读全文
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication3 { ...
阅读全文