salve, con il seguente codice dopo aver aperto da vb6 un foglio excel scarico da un sito tramite web query un tabella.
E' possibile scaricare tabelle tramite web query ma che non utilizzano il foglio di excel, ad esempio usando lo spreadsheet o altro ?
Grazie
prova č il foglio di excel aperto da codice vb6
prova.Activate
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.xxxxxxxxxxx.html", _
Destination:=prova.Range("A1"))
.Name = "lista"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
ho risolto cosė, estraendo il codice html e poi con semplici ricerche di stringa prelevo i dati che mi servono
'Add Component: Microsoft Internet Transfer Control 6
Dim URL As String
Din Testo As String
F_Base.Inet1.Cancel
F_Base.Inet1.RequestTimeout = 15
F_Base.Inet1.AccessType = icUseDefault
URL = "http://www.xxxxxxxxxxxxxxxxxxxx.it"
TESTO = F_Base.Inet1.OpenURL(URL, icString)
Ultima modifica effettuata da piter123 il 01/10/2011 alle 17:45 |