Oppure

Loading
28/09/11 6:24
piter123
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;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 = "xxxxxxxxxxxxxxxxxxxx.it";
TESTO = F_Base.Inet1.OpenURL(URL, icString)
Ultima modifica effettuata da piter123 01/10/11 15:45
aaa