随笔分类 - 随笔
摘要:import pandas as pd import pyodbc import time # 文件路径及文件名 mdb_file = r"X:\xxx.accdb" driver = '{Microsoft Access Driver (*.mdb, *.accdb)}' cnxn = pyodb
阅读全文
摘要:import pymysql cnn =pymysql.connect(host="localhost", user="root",password="1234567",database="test",charset="utf8") cursor=cnn.cursor() res =cursor.execute("select * from contacts;") print("{} rows i
阅读全文
摘要:配置文件截图如下: 提取主机和URL信息代码: 执行结果:
阅读全文
摘要:功能:ListView控件实现连接数据库实现显示查询数据功能。 图片: 代码: Private Sub CommandButton1_Click() Dim res As String res = TextBox1.Text Call UserFormabc(res) End Sub 'ItemCl
阅读全文
摘要:需要引用连个库,Microsoft ADO Ext. 6.0 for DDL and Security, Miscrosoft ActiveX Data Objects 2.7 Library .
阅读全文
摘要:方法1. 用VBA自带的dir()判断,代码如下: 在 Microsoft Windows 中, Dir 支持多字符 (*)和单字符 (?) 的通配符来指定多重文件 方法2. 用Windows的文件系统函数进行判断,代码如下:
阅读全文
摘要:Option Explicit 'read Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" _ (ByVal lpApplicationName As String, _ ...
阅读全文
摘要:功能:根据项目号和步骤ID,更新指定步骤完成时间。这里里边要匹配两个条件一个是项目ID “”projectID“” 另一个是 “”StepID“” 步骤ID。
阅读全文
摘要:功能:判断EXCEL指定单元格区域内的数据在数据库中是否存在如果存在将更新指定区域单元格内的数据到数据库中,如果有区域内有新增的数据那么将新增的数据添加到数据库。 如果指定区域内的数据在数据库中不存在将添加指定区域内单元格的数据到数据库中。 代码
阅读全文
摘要:'Upload File to the specific folder Sub UploadImages(s$, c$) 's$ Buttom number 'c$ Specify a location to show image 'souf$ The local path of the image file 'des$ The dest path of the i...
阅读全文
摘要:效果:每次提交或刷新标段,表单案指定格式实现自动编号。如当天日期加数字编号的格式 即 2019年2月3日产生的第一张表单产生的编号格式为20190203-001 以此类推第二张表单编号为20190203-002 如果日期发生变化,那么日期后面的编号也从1开始。如2019年2月4日那么,他的编号201
阅读全文
摘要:1 向指定单元格区域内写入数据 Sub example1() Dim arr(1 To 3) arr(1) = Array("A", "B", "C", "D") arr(2) = Array("E", "F", "G", "H") arr(3) = Array("I", "J", "K", "L"
阅读全文
摘要:迭代 1 文件操作 我们读取文件的时候,会用到一个readline()方法,其实它就是一个迭代器,它会返回当前的数据,然后自动的调用内置的next()方法来让文件的读取头自动的移动到当前的下面一行,准备下次的读取,到达文件末尾时,就会返回空字符串. 以下方法读取速度快,占用内存小适合读取大文件。 2
阅读全文

浙公网安备 33010602011771号