- 博客(7)
- 问答 (1)
- 收藏
- 关注
原创 VBA学习笔记:1、用msxml v6.0网抓
1、VBA窗口--工具--引用--microsoft xml v6.02、用MSXML2.XMLHTTP60Dim a As MSXML2.XMLHTTP60Set a = New MSXML2.XMLHTTP60With a .Open "get", "<url>", False .setRequestHeader .sendEnd With3、得到的源代码 处理方式不同,结果不同用VBA debug打印出来,会残缺不全,但把...
2021-11-07 21:18:17
1263
原创 6、自写<VBA函数>二维表函数及判断函数
一、二维表函数(从二维表中取值,根据列名称及行名称,索定目标值)Public Function erweibiao(c, cc, d, dd, cd As Range)Dim a, ba = Application.Match(c, cc, 0) '线路代码在第几位b = Application.Match(d, dd, 0) '车型在第几位erweibiao = Application.Index(cd, a, b) '按列与行,二维数锁定目标值End Function...
2021-11-07 10:19:05
209
原创 5、自写<VBA函数>关于字体与单元格颜色、大小的函数
一、取值字体颜色值(用于excel工作中,根据字体颜色做出下一步操作)Public Function FontColor(rng As Range) FontColor = rng.Font.ColorIndexEnd Function二、取值字体大小(用于excel工作中,根据字体颜色大小做出下一步操作)Public Function FontSize(rng As Range) FontSize = rng.Font.SizeEnd Function三、取值单元格颜色
2021-11-06 14:04:40
2379
原创 4、<VBA>学习用刘永富老师插件解析JSON格式数据
Sub 刘永富老师插件学习() Dim j As API.JSON Set j = New API.JSON j.Parse "{'data':{'route':{'destination':'121.473701,31.230416','origin':'118.796877,32.060255','paths':[{'distance':296768,'duration':15060,'restriction':0,'steps':[],'strategy':'时间最短','to...
2021-10-30 10:30:50
634
原创 3、VBA网抓高德地图货车路径规划距离(借助刘永富老师插件解析JSON格式数据)
Sub 高德货车() Dim x As MSXML2.XMLHTTP60 Set x = New MSXML2.ServerXMLHTTP60 With x .Open "GET", "https://restapi.amap.com/v4/direction/truck?width=2.5&strategy=10&size=2&weight=1.5&axis=2&origin=118.796877,32.060255&destinatio...
2021-10-30 10:27:59
626
原创 2、自写VBA函数2<高德测距>用VB网抓高德地图货车导航距离
Function 高德货车里程(d1 As String, d2 As String)'第一步:抓取网页源代码(JSON格式) Dim x As MSXML2.XMLHTTP60 Set x = New MSXML2.ServerXMLHTTP60 With x .Open "GET", "https://restapi.amap.com/v4/direction/truck?width=2.5&strategy=10&size=2&weight=1.5&...
2021-10-29 14:27:45
574
原创 1、自写VBA函数<高德测距>用VB网抓高德地图汽车导航距离
Function 高德测距(a As String, b As String) Dim x As MSXML2.XMLHTTP60 Set x = New MSXML2.ServerXMLHTTP60 Dim sc As MSXML2.DOMDocument60 With x .Open "GET", "https://restapi.amap.com/v3/direction/driving?origin=" & a & "&destination=" &a...
2021-10-25 23:37:32
411
空空如也
初学者提问:好像sublime不能识别数字,请教要怎么做。
2021-04-27
TA创建的收藏夹 TA关注的收藏夹
TA关注的人