VBA/Excel/Access/Word/XML/XML Transformed — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 19:33, 26 мая 2010
Applying a Stylesheet to an ADO XML Document and Importing It to Access
<source lang="vb">
Sub ApplyStyleSheetAndImport()
Dim myXMLDoc As New MSXML2.DOMDocument50 Dim myXSLDoc As New MSXML2.DOMDocument50 Dim newXMLDoc As New MSXML2.DOMDocument50 myXMLDoc.async = False If myXMLDoc.Load("C:\data.xml") Then myXSLDoc.Load "C:\trans.xsl" If Not myXSLDoc Is Nothing Then myXMLDoc.transformNodeToObject myXSLDoc, newXMLDoc newXMLDoc.Save "C:\Converted.xml" Application.ImportXML "C:\Converted.xml" End If End If Set myXMLDoc = Nothing Set myXSLDoc = Nothing Set newXMLDoc = Nothing
End Sub
</source>