Forum » Programiranje » uvoz podatkov iz spleta -username/password
uvoz podatkov iz spleta -username/password
basist13 ::
Zdravo,
s spletne strani bi rad v excel uvažal podatke, pri čemer pa je za dostop do podatkov potreben username in password. Kako bi napisal tale uvoz posdatkov v visual basicu?
Hvala za pomoč.
Lp;basist
poskušal sem s temle, vendar ne deluje
Sub Login_WebQuery()
Dim MyPost As String
Const MyUrl As String = "http://www.gvin.com/LoginPageGvin/Login...
Const txtUserName As String = "xxx" 'Change user name here
Const txtPassword As String = "xxxx" 'Change password here
MyPost = txtUserName & txtPassword
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.gvin.com/siMatrix/Default.as... _
, Destination:=Range("$A$5"))
.Name = "Default.aspx?Stran=podjetje&Podstran=lastniska&ID=5043611"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "4,5,10,11,""ctl12_ctl01_gvPretekloStanje"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
s spletne strani bi rad v excel uvažal podatke, pri čemer pa je za dostop do podatkov potreben username in password. Kako bi napisal tale uvoz posdatkov v visual basicu?
Hvala za pomoč.
Lp;basist
poskušal sem s temle, vendar ne deluje
Sub Login_WebQuery()
Dim MyPost As String
Const MyUrl As String = "http://www.gvin.com/LoginPageGvin/Login...
Const txtUserName As String = "xxx" 'Change user name here
Const txtPassword As String = "xxxx" 'Change password here
MyPost = txtUserName & txtPassword
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.gvin.com/siMatrix/Default.as... _
, Destination:=Range("$A$5"))
.Name = "Default.aspx?Stran=podjetje&Podstran=lastniska&ID=5043611"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "4,5,10,11,""ctl12_ctl01_gvPretekloStanje"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | java / mysql / počasne poizvedbeOddelek: Programiranje | 766 (695) | BRBR |
» | Makroji v exceluOddelek: Programska oprema | 2518 (2412) | smetko |
» | VB & SQL 2005 ExpressOddelek: Programiranje | 1264 (1146) | camx |
» | Excel vprašanjeOddelek: Programiranje | 1157 (1056) | matic |
» | API+VBOddelek: Programiranje | 2120 (1824) | webblod |