murarup
02-10-2017, 06:00 AM
Hi all,
I'm using the following code to retrieve a webpage content:
Worksheets("Import").Activate
With ActiveSheet
For i = .QueryTables.Count To 1 Step -1
.QueryTables(i).Delete
Next
End With
Sheets("Import").Cells.ClearContents
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" + Link1, _
Destination:=Range("$A$1"))
.Name = "home"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.MaintainConnection = False
.Refresh BackgroundQuery:=True
End With
But I'm ending with the following error in "Import" sheet:
==========================================
repo tool | Gerrit Setup Wiki | ACH Gerrit Support | Gerrit UI plugin
Loading Gerrit Code Review ...
Gerrit requires a JavaScript enabled browser.
Same code is working on other webpages, it looks to be related to JS active on default browser.
Note: I've checked the default browser (IE) and the support for JS is activate, same page is open correctly directly in IE browser.
Thanks for your help
I'm using the following code to retrieve a webpage content:
Worksheets("Import").Activate
With ActiveSheet
For i = .QueryTables.Count To 1 Step -1
.QueryTables(i).Delete
Next
End With
Sheets("Import").Cells.ClearContents
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" + Link1, _
Destination:=Range("$A$1"))
.Name = "home"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.MaintainConnection = False
.Refresh BackgroundQuery:=True
End With
But I'm ending with the following error in "Import" sheet:
==========================================
repo tool | Gerrit Setup Wiki | ACH Gerrit Support | Gerrit UI plugin
Loading Gerrit Code Review ...
Gerrit requires a JavaScript enabled browser.
Same code is working on other webpages, it looks to be related to JS active on default browser.
Note: I've checked the default browser (IE) and the support for JS is activate, same page is open correctly directly in IE browser.
Thanks for your help