07 2008 档案

在SQL语句中如何将text或ntext类型字段数据中的回车符替换成字符
摘要:--ntext字段的替换处理示例--全表替换 --测试数据 create table test(id varchar(3),txt ntext) insert into test select 1,abc我是中a国人 deaf;sdakj21432 我要处理中文 go -... 阅读全文

posted @ 2008-07-31 10:51 那片云 阅读(1275) 评论(0) 推荐(0)

NET 获取局域网内所有SQL Server 服务器列表
摘要:using System; using System.ComponentModel; using System.Windows.Forms; using SQLDMO; using Application = System.Windows.Forms.Application; namespace SQLDMOSample { /**//// /// Summary descri... 阅读全文

posted @ 2008-07-18 18:22 那片云 阅读(216) 评论(0) 推荐(0)

利用ADO.NET将SQL表导出到Excel中
摘要:#region SQL数据库导入到Excel表中(运用ADO.NET) /// /// 单表导入Excel单页中 /// /// 表名 /// public static void ExportDataByQueryTableA(string dtname,int index,Label msg) { long totalCount=0; lo... 阅读全文

posted @ 2008-07-16 15:25 那片云 阅读(982) 评论(1) 推荐(0)

C#程序中控制Windows的任务栏
摘要:如果你要在你的C#程序中控制Windows的任务栏,有两个Windows api 可以帮到你!他们就是 FindWindowA 和 ShowWindow C#中声明如下: using System.Runtime.InteropServices; [DllImport("user32.dll", EntryPoint = "FindWindowA")] public static extern ... 阅读全文

posted @ 2008-07-10 17:51 那片云 阅读(368) 评论(0) 推荐(0)

Microsoft.Office.Interop.Excel命名空间
摘要:Microsoft.Office.Interop.Excel命名空间要添加什么引用 在visual Studio 2005命令提示工具中,定位到Excel安装目录,运行“TlbImp EXCEL.EXE”命令,把Excel.exe编译为Excel.dll。这一步会... 阅读全文

posted @ 2008-07-10 14:51 那片云 阅读(5498) 评论(3) 推荐(0)

C#将Excel表格中的数据导入SQL数据库
摘要:private static string _filePath=string.Empty ; #region Excel导入SQL数据库 /// /// 获取Excel数据表列表 /// /// public static ArrayList GetExcelTables() { //将Excel架构存入数据里 System.Data.DataTabl... 阅读全文

posted @ 2008-07-10 13:37 那片云 阅读(4151) 评论(0) 推荐(0)

Excel管理的一个类
摘要:namespace LiFengguo.ExcelManage { /**//// /// ExcelManage 的摘要说明。 /// public class ExcelManage { public ExcelManage() { } /**//// /// 获取Ex... 阅读全文

posted @ 2008-07-09 19:02 那片云 阅读(292) 评论(0) 推荐(0)

一个处理XML文件的类
摘要: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... 阅读全文

posted @ 2008-07-08 13:41 那片云 阅读(209) 评论(0) 推荐(0)

c#操作excel后关闭excel.exe的方法
摘要:C#和Asp.net下excel进程一被打开,有时就无法关闭, 尤其是website.对关闭该进程有过GC、release等方法,但这些方法并不是在所有情况下均适用。 于是提出了kill process的方法, 目前我见过的方法多是用进程创建时间筛选excel.exe进程, 然后kill 。 这样的方法是不精确的, 也是不安全的, 通过对网上一些关于Api运用文章... 阅读全文

posted @ 2008-07-08 11:10 那片云 阅读(806) 评论(1) 推荐(0)

C# 将多张sql表格导出到Excel表中
摘要: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... 阅读全文

posted @ 2008-07-08 10:03 那片云 阅读(534) 评论(0) 推荐(0)

C# 操作Excel表格
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication3 { ... 阅读全文

posted @ 2008-07-08 09:14 那片云 阅读(359) 评论(0) 推荐(0)

导航