易截截图软件、单文件、免安装、纯绿色、仅160KB

c# 操作excel

 OleDbConnection conn = null;
            try
            {
               `string strConn;
                strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +
                    "Data Source="+path+";"+
                "Extended Properties='Excel 8.0;'";
                conn = new OleDbConnection(strConn);
                conn.Open();
                string Sql = "select * from [list$]";
                System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand();
                OleDbDataAdapter ddp = new OleDbDataAdapter(Sql, conn);
                DataSet ds = new DataSet();
                ddp.Fill(ds);
                //cmd.Connection = conn;
                 //在Excel的Sheet1的A3到H3处插入数据
                //cmd.CommandText = "insert into [Sheet1$A3:H3] (F1,F2,F3,


相关文档:

使用JAVA和C#开发Ribbon界面

Ribbon 原来出现在 Microsoft Office 2007 的 Word、Excel 和 Powerpoint 組件中,后来也被运用到 Windows 7 的一些附加组件等其它软件中,如画图和写字板。它是一个收藏了命令按钮和图标的面板。它把命令组织成一组"标签",每一组包含了相关的命令。每一个应用程序都有一个不同的标签组,展示了程序所提供 ......

c#(asp.net)几中不同从前台页面操作后台

第一种
<%=RetInfo("DB","数据库") %>
<%=RetInfo("YX_UpFile","上传文件") %>
<%=RetfileInfo("Include/", "广告")%>
//从前台调用后台方法
//从前台调用后台的方法..并向其方法传入不同的参数!
第二种
<ItemTemplate >
<%#Ret_stat(Convert.ToInt16(Eval("YX_Stat1")), "热点")%> ......

C# Active控件,并触发javascript事件

创建一个Winform用户控件 UserControl1
 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Reflection;
namespace MyActiveT ......

ASP.NET(C#)常用代码30例

1. 打开新的窗口并传送参数:
  传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
  接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
  2.为按钮添加对话框
Button1 ......

ArcEngine 图例C#源码:

private void MakeLegend(IActiveView activeView,IPageLayout pageLayout)
      {
          //定义图例UID对象
          UID uid = new UIDClass();
      &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号