Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 2208|回复: 0

VBA读取htm内容,但读不完整,求帮助

[复制链接]
发表于 2020-4-5 07:12 | 显示全部楼层 |阅读模式
我使用VBA读取htm的全部内容,但发现读取出来的内容不全,请大家帮我看看怎么回事吧,谢谢了!
  1. Dim f, htm As String
  2.     f = Application.GetOpenFilename("Html Files(*.htm),*.htm", 1, "Please select a htm file")
  3.     If f = False Then
  4.         MsgBox "你没有选择文件", vbOKOnly, "提示"
  5.         Exit Sub
  6.     End If
  7.     '打开htm文档,并读取内容
  8.     With CreateObject("microsoft.xmlhttp")
  9.         .Open "gert", f, False
  10.         .send
  11.         htm = .responsetext
  12.     End With
复制代码


test.rar

64.01 KB, 下载次数: 3

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-4-26 03:26 , Processed in 0.227764 second(s), 9 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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