Dashboard > Public Content > ... > ExcelVBA > Get An XSL Processor
  Public Content Log In   View a printable version of the current page.  
  Get An XSL Processor
Added by James Richardson, last edited by James Richardson on Jul 27, 2006
Labels: 
(None)

Function getXslProcessor(xslfile As String) As MSXML2.IXSLProcessor
    
    Dim document As New MSXML2.FreeThreadedDOMDocument
    
    document.async = False
    document.Load (xslfile)
    
    If (document.parseError.errorCode <> 0) Then
        Err.Raise errorBaseValue + 10, "XSLProcessor.getXSLProcessor", "XML Document " & xslfile & " Invalid" & document.parseError.reason
    End If
    
    Dim xslt As New MSXML2.XSLTemplate
    
    Set xslt.stylesheet = document
    
    Dim processor As MSXML2.IXSLProcessor
    
    Set processor = xslt.createProcessor
    
    Set getXslProcessor = processor
    
End Function
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.1 Build:#806 May 06, 2007) - Bug/feature request - Contact Administrators