收藏 分享(赏)

Excel VBA_ADO+SQL实例集锦.doc

上传人:tangtianxu1 文档编号:3064656 上传时间:2018-10-02 格式:DOC 页数:61 大小:425.50KB
下载 相关 举报
Excel VBA_ADO+SQL实例集锦.doc_第1页
第1页 / 共61页
Excel VBA_ADO+SQL实例集锦.doc_第2页
第2页 / 共61页
Excel VBA_ADO+SQL实例集锦.doc_第3页
第3页 / 共61页
Excel VBA_ADO+SQL实例集锦.doc_第4页
第4页 / 共61页
Excel VBA_ADO+SQL实例集锦.doc_第5页
第5页 / 共61页
点击查看更多>>
资源描述

1、1, 包含空值的记录 f13 is null http:/ Properties=Excel 8.0;hdr=no;Data Source=“ extended properties=excel 8.0;“ extended properties=excel 8.0;“ extended properties=excel 8.0;hdr=no;data source=“ extended properties=excel 8.0;hdr=no;data source=“ Extended Properties =Excel 8.0;HDR=no;Data Source= “ extended

2、properties=excel 8.0;data source=“ extended properties=excel 8.0;hdr=no;data source=“ Extended Properties=Excel 12.0;hdr=no;data source=“ extended properties=excel 8.0;hdr=no;data source=“ extended properties=excel 8.0;hdr=no;data source=“ extended properties=excel 8.0;hdr=no;data source=“ extended

3、properties=excel 8.0;hdr=no;data source=“ Extended Properties=Excel 8.0;“.CursorLocation = adUseClient.OpenEnd WithSet rs = cnn.OpenSchema(adSchemaTables)Do Until rs.EOFIf Right(rs.Fields(“TABLE_NAME“).Value, 1) = “$“ ThenstrSheetName = Mid(rs.Fields(“TABLE_NAME“).Value, 1, Len(rs.Fields(“TABLE_NAME

4、“).Value) - 1)Exit DoEnd Ifrs.MoveNextLooprs.CloseSet rs = Nothingstrsql = “SELECT * INTO “ FROM“ _extended properties=excel 8.0;data source=“ “ _“ _“ _dbq=“ extended properties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ extended p

5、roperties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ Ex

6、tended Properties=Excel 8.0;hdr=no;Data Source=“ hdr=no中要加 hdr=no。22,SQL 不包含很多内容 问题http:/ OLEDB:Database Password=“ extended properties=excel 8.0;data source=“ extended properties=excel 8.0;hdr=no;data source=“ extended properties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ e

7、xtended properties=excel 8.0;data source=“ extended properties=excel 8.0;data source=“ Extended Properties=Excel 8.0;Data Source=“ hdr=yes;imex=1;data source=“ extended properties=excel 8.0;data source=“ Extended Properties=Excel 8.0;Data Source=“ & ThisWorkbook.FullNameSqlstr = “Select 定额编号,项目名称,单位,sum(数量), 标高,备注 From 计算稿$b3:l1000 where 定额编号 Arr(i - 1, 6) Thenr = r + 1ReDim Preserve Arr1(1 To r)Arr1(r) = iEnd IfNextFor j = 1 To rIf j “ And js = “ Thenjs = Format(Date, “yyyy-m-d“)ElseIf ks = “ And js “ Thenks = Format(“2009-1-1“, “yyyy-m-d“)End IfSet Cn = CreateObject(“Adodb.Connection“)

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 专业基础教材

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报