excel - 跳过安全警告
问题描述
我从受信任的网站导入数据。我收到来自 Excel 的警告消息。
我多次尝试安装此证书。
我想要的是,当出现此警告消息时,自动单击是。
导入数据的代码
Sub OPTIONSPULL()
For X = 1 To 7
Worksheets("OPTIONS").Select
Worksheets("OPTIONS").Activate
MYSTR = "URL;https://www.nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?segmentLink=17&instrument=OPTIDX&symbol=NIFTY&date=14NOV2019"
MYSTR = Cells(X, 1)
Dim STR As String, I As Integer
For I = X To X
STR = Cells(I, 2).Value
Next I
Worksheets.Add(after:=Worksheets(Worksheets.Count)).Name = STR
With ActiveSheet.QueryTables.Add(Connection:= _
MYSTR, Destination:=Range("$A$1"))
.Name = "optionKeys.jsp?segmentLink=17&instrument=OPTIDX&symbol=NIFTY&date=14NOV2019"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 15
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingRTF
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = True
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With
Next X
Worksheets("OPTIONS").Select
End Sub
解决方案
推荐阅读
- python - 通过 API 访问数据后,如何自动化推文?
- swift - 角度接近 360 度时以快速、奇怪的行为进行角度评估
- javascript - 使用 Fetch API 提交 WordPress 表单时,我不断收到 400(错误请求)
- javascript - 如何忽略浏览器窗口的大小?
- python - 我们可以只命名数据框的前 3 列吗?
- sql - 如何根据别名检查字段是否为空
- git - git ls-remote --tags:如何获取日期信息?
- java - 如何为 SQL Server 构建 Google Cloud SQL JDBC URL
- r - 在 Moran.I 和 moran.test 之间获得不同的测试结果
- tensorflow - 形状与 vgg16 keras 不匹配:预期 ndim=4,发现 ndim=2,收到形状 [无,无]