Datei Lokal speichern
04.10.2009 13:51:29
Tino
Hallo,
Du könntest diese csv Datei aus dem Internet runterladen und Lokal abspeichern
danach mittels Formel den Wert raus lesen.
Hier mal ein Code um eine Datei aus dem Internet Lokal zu speichern.
Public Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _
ByVal pCaller&, ByVal szURL$, ByVal szFileName$, ByVal dwReserved&, ByVal lpfnCB&) As Long
Function DownloadFile(ByVal strURL$, ByVal strLocalFilename$) As Boolean
Dim lngRet As Long
lngRet = URLDownloadToFile(0, strURL, strLocalFilename, 0, 0)
If lngRet = 0 Then DownloadFile = True
End Function
Private Sub Download_Datei_aus_Internet()
Dim strQuelldatei As String
Dim strZieldatei As String
'Quelle
strQuelldatei = "http://www.Link zu Deiner csv Datei.csv"
'Ziel
strZieldatei = "C:\Daten.csv"
With Application
.ScreenUpdating = False
.DisplayAlerts = False
If DownloadFile(strQuelldatei, strZieldatei) = True Then
MsgBox "Download ist OK"
Else
MsgBox "Download nicht OK"
End If
.DisplayAlerts = True
.ScreenUpdating = True
End With
End Sub
Gruß Tino