אין לי פנאי כ"כ לבדוק מה בדיוק.
אבל הנה 2 קודים שיש לי במאגר. 1. קבלת כל הטקסט של קובץ הXML.
Dim xmlDoc Dim xmlError Dim xmlRootElement Dim success As Boolean Set xmlDoc = CreateObject("MSXML2.DOMDocument") ' Allow the document to complete loading xmlDoc.async = False ' Validate the document against a DTD xmlDoc.validateOnParse = True success = xmlDoc.Load("http://www.tapuz.co.il/tapuzforum/main/rss.asp?forum=193") If success = True Then Set xmlRootElement = xmlDoc.documentElement Me.txtxml = xmlRootElement.XML Set xmlRootElement = Nothing Else Set xmlError = xmlDoc.parseError Me.txtxml = "Error code: " & xmlError.errorCode & vbCrLf _ & "Reason: " & xmlError.reason & vbCrLf _ & "Source: " & vbCrLf & xmlError.srcText & vbCrLf _ & "URL: " & xmlError.url Set xmlError = Nothing End If
2. ייבוא קובץ XML לתוך טבלה קיימת (הדוגמא הנ"ל מקבלת את קובץ הXML של השער היציג של הדולר ומכניסה אותו לטבלה במסד.
Application.ImportXML DataSource:="http://www.bankisrael.gov.il/heb.shearim/currency.php", ImportOptions:=acStructureAndData
בהצלחה!