EXCEL页面数据快速写入SQL数据库

摘要: 将EXCEL数据存入SQL表, 一万行记录大概5秒Dim conn As New ADODB.ConnectionDim CNN As New ADODB.Connection'Dim rst As New ADODB.RecordsetDim Sql As StringDim j, v As In... 阅读全文
posted @ 2014-06-19 15:03 stone.amoi 阅读(720) 评论(0) 推荐(0) 编辑

VBA 提取中文字符的两个函数

摘要: Function RemoveNarrow(str As String) As String Set regEx = CreateObject("vbscript.regexp") With regEx .Global = 1 .Pattern = "[\x01-\x7f]+" RemoveNarrow = .Replace(str, "") End WithEnd FunctionFunction getCN(str As String) As String Dim iAsc As Integer Dim char As... 阅读全文
posted @ 2012-10-24 10:25 stone.amoi 阅读(2129) 评论(0) 推荐(0) 编辑

SQL服务器数据快速转入EXCEL Sheet

只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2012-09-24 16:06 stone.amoi 阅读(16) 评论(0) 推荐(1) 编辑

Excel 中调用SQL存储过程

摘要: Dim CN As New ADODB.ConnectionDim iCmd As ADODB.CommandConst conn = "Provider = SQLOLEDB;" & _ "Data Source = ip;" & _ "Initial Catalog = storeDB;User ID =sa;Password = pw;"CN.Open conn Set iCmd = New ADODB.Command With iCmd .ActiveConnection = ... 阅读全文
posted @ 2012-05-29 09:20 stone.amoi 阅读(2174) 评论(0) 推荐(0) 编辑

C# 调用 RFC

摘要: ABAP写好RFC(Remote Function Call), C#调用, 取得数据放入非SAP环境下的数据库做SAP外围系统.RFC:View Code FUNCTION ZRFC_RESB_DATA.*"----------------------------------------------------------------------*"*"Local interface:*" IMPORTING*" VALUE(ZRSNUM) LIKE RESB-RSNUM DEFAULT SPACE*" TABLES*" 阅读全文
posted @ 2012-03-13 15:25 stone.amoi 阅读(2923) 评论(4) 推荐(0) 编辑

考勤机文本记录写入EXCEL

摘要: 考勤机记录格式:000971201202271838000974201202271839000982201202281849000953201202281849格式说明:1~5 工号6 (1=上班上班, 2=上午下班, 3=下午上班, 4=下午下班, 5=晚上上班, 6=晚上下班)7~10 年11~12 月13~14 日15~16 时17~18 分EXCEL 格式: 日期员工编号姓名上午上班上午下班下午上班下午下班晚上上班晚上下班 View Code 1 Private Sub CommandButton1_Click() 2 Dim TxtName A... 阅读全文
posted @ 2012-03-13 14:27 stone.amoi 阅读(725) 评论(0) 推荐(0) 编辑

EXCEL记录写入SQL表

摘要: 按钮事件:View Code Private Sub CommandButton1_Click() Dim CN As New ADODB.Connection Dim recs As Integer Dim i As Integer Dim sql1, sql2 As String Dim j As Integer Const conn = "Provider = SQLOLEDB;" & _ "Data Source = SVR12\SQLEXPRESS;" & _ "Initial Cat... 阅读全文
posted @ 2012-03-13 13:57 stone.amoi 阅读(260) 评论(0) 推荐(0) 编辑