- 博客(9)
- 收藏
- 关注
原创 AttributeError: module ‘win32com.gen_py.00062FFF-0000-0000-C000-000000000046x0x9x6‘ has no attribute
记录下关于AttributeError: module ‘win32com.gen_py.00062FFF-0000-0000-C000-000000000046x0x9x6’ has no attribute 'CLSIDToClassMap’报错的解决方法:在类似如下目录找到对应的文件(一大坨类似00000)命名的文件夹/文件删除即可C:\Users\chuang\AppData\Local\Temp\gen_py\3.9...
2021-10-18 17:52:51 469
原创 MySQL 导入碰到字符集错误
用管理员身份进入,打开C:\Program Files (x86)\MySQL\MySQL Server 5.5\my.ini记事本自动打开,查找character相关的表述,把以下修改为:default-character-set=utf8character-set-server=utf8重新进入MySQLnet start mysqlmysql -h localhost -P 3306 -u root -pshow variables like “%ch..
2021-09-27 11:50:05 187
原创 Python: 查找文件夹中的文件并写入txt
import osfilepath=r'\\10.2.1.214\Data\Oracle\BillingFile_by_SO1\\'with open('python.txt','w',encoding='utf-8') as f: for root,dirs,files in os.walk(filepath): for name in files: f.write(os.path.join(root,name)+'\n') # fo
2021-08-26 14:57:38 169
原创 Excel公式相对引用转为对应数值
计算仓储费:要把Excel里显示的公式换成引用的数值,以便转换为文本格式导入到MySQL里。VBA function:Function TFFormula(rng As Range)Dim fl As Stringfl = rng.FormulaDim reg As Object, mt As Object, res As StringSet reg = CreateObject("vbscript.regexp")With reg .Global = True .Patt.
2021-08-24 14:58:23 533
原创 Windows环境下启动Mysql服务提示“1067 进程意外终止”的解决方案
在Windows服务里启动Mysql服务时提示“1067 进程意外终止”。此时我们打开计算机管理查看Windows日志,如下图所示:完整错误提示如下:The server option ‘lower_case_table_names’ is configured to use case sensitive table names but the data directory is on a case-insensitive file system which is an unsupported
2021-08-14 21:42:42 2834
原创 VBA另存指定工作表并改名
Sub sheet另存为工作簿() Sheets(Array("人员档案", "明细一", "明细二", "明细三")).Copy Workbooks(Workbooks.Count).SaveAs ThisWorkbook.Path & "/" & "数据备份.xls"End Sub
2021-07-14 11:51:03 4072
原创 Python: 获取文件路径中最新的文件+lamba函数
def new_file(path1):lists = os.listdir(path1)lists.sort(key= lambda f: os.path.getmtime(path1 + ‘\’ + f))file_path = os.path.join(path1, lists[-1])return file_pathlambda函数也叫匿名函数,即,函数没有具体的名称。key=lambda fn:os.path.getmtime(test_dir+’\’+fn)#相当于def key
2021-07-09 14:39:07 258
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人