ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 效率神器,一键搞定繁琐工作
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
让更多数据处理,一键完成 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南

[分享] 纯vba代码解析json格式数据

  [复制链接]

TA的精华主题

TA的得分主题

发表于 2019-5-30 11:14 | 显示全部楼层
我是来讨说法的 发表于 2019-5-30 10:52
里面有2个类模块,你为什么不导入?

额  在附件里啊  没看到。。。

TA的精华主题

TA的得分主题

发表于 2019-10-26 17:32 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
{"errorCode":0,"message":"操作成功","result":{"businessCode":0,"message":"操作成功","data":[{"preDrawTime":"2019-10-26 16:30:00","preDrawIssue":20191026198,"preDrawCode":"03,10,07,08,05,06,01,04,09,02","sumFS":13,"sumBigSamll":0,"sumSingleDouble":0,"firstDT":0,"secondDT":0,"thirdDT":0,"fourthDT":0,"fifthDT":1,"groupCode":1},{"preDrawTime":"2019-10-26  00:15:00","preDrawIssue":20191026003,"preDrawCode":"02,06,08,10,05,04,09,01,07,03","sumFS":8,"sumBigSamll":1,"sumSingleDouble":1,"firstDT":1,"secondDT":1,"thirdDT":0,"fourthDT":0,"fifthDT":0,"groupCode":1},{"preDrawTime":"2019-10-26 00:10:00","preDrawIssue":20191026002,"preDrawCode":"06,07,03,04,08,09,05,02,01,10","sumFS":13,"sumBigSamll":0,"sumSingleDouble":0,"firstDT":1,"secondDT":0,"thirdDT":0,"fourthDT":1,"fifthDT":1,"groupCode":1},{"preDrawTime":"2019-10-26 00:05:00","preDrawIssue":20191026001,"preDrawCode":"01,08,07,10,06,03,04,05,02,09","sumFS":9,"sumBigSamll":1,"sumSingleDouble":0,"firstDT":1,"secondDT":0,"thirdDT":0,"fourthDT":0,"fifthDT":0,"groupCode":1}]}}这个怎么高啊 大神

TA的精华主题

TA的得分主题

发表于 2019-10-26 17:35 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2020-2-2 16:05 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2020-5-11 14:54 | 显示全部楼层
请问 ,这种格式的怎么取

{"status":"ok",
"environment":{
"environmentId":9783,"name":"开发环境","projectId":5590,
"applications":[
{"applicationId":36925,"name":"组织长","version":15,"updateDate":1588583319000},
{"applicationId":37015,"name":"固定资产","version":21,"updateDate":1588576103000},
{"applicationId":37510,"name":"营业","version":11,"updateDate":1588571961000},
{"applicationId":49605,"name":"一栏","version":1,"updateDate":1587953829000}
]
}
}

这种格式的怎么取
组织长 15 1588583319000
固定资产 21 1588576103000
这样的

TA的精华主题

TA的得分主题

发表于 2020-6-4 08:21 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2020-6-24 16:30 | 显示全部楼层
测了一下那个cStringBuilder类。按代码开头的例子,运行1万次字符串连接,VBA用了约0.1秒,这个类用了约5.7秒。我的office是365版。application.version = 16.0 , 64位。完全不像作者说的VB要用34秒,他的用了0.34秒。咋回事啊,就算微软进步了。作者的程序不该变慢啊。帮我看看哪里有问题
Private Sub TestRouting()
    Dim s$, s1$: s1 = "http://vbaccelerator.com/"
    t = Timer()
    For i = 1 To 10000
        s = s & s1
    Next
    MsgBox Timer() - t
    Debug.Print Len(s)  '250000
End Sub
Private Sub TestRouting2()
    Dim s As New cStringBuilder
    s.TheString = ""
    s.ChunkSize = 300000
   
    Dim s1$: s1 = "http://vbaccelerator.com/"
    t = Timer()
    For i = 1 To 10000
        s.Append s1
    Next
    MsgBox Timer() - t
    Debug.Print Len(s.toString)  '250000
End Sub

TA的精华主题

TA的得分主题

发表于 2020-8-25 16:55 | 显示全部楼层
zerer 发表于 2020-6-24 16:30
测了一下那个cStringBuilder类。按代码开头的例子,运行1万次字符串连接,VBA用了约0.1秒,这个类用了约5.7 ...

s.ChunkSize = 300000
设置的值太小了,试试设置为“1638400”,我的电脑用这个类约0.0078秒

TA的精华主题

TA的得分主题

发表于 2020-9-14 12:28 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2023-5-11 12:34 | 显示全部楼层
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-11-18 16:27 , Processed in 0.031968 second(s), 6 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表