M
Marcos Hercules
Hey all,
I've been trying to view some result through Excel from my xslt. I'm
using adodb to obtain datas in my sheet but nothin's appear, could
anyone tell me what' s going wrong in my vba code?
Dim app As New MSXML2.DOMDocument30
Dim xmlDom, xslDom, projDom, xslFileName As String
Dim xslt As New MSXML2.XSLTemplate30
Dim xslDoc As New MSXML2.FreeThreadedDOMDocument30
Dim xmlDoc As New MSXML2.DOMDocument30
Dim xslProc As IXSLProcessor
Dim xmlout As New MSXML2.FreeThreadedDOMDocument30
Dim oStream As New adodb.Stream
Dim oRecord As New adodb.Recordset
Set oStream = New adodb.Stream
oStream.Open
xslDoc.async = False
xslDoc.Load "c:\compara.xsl"
If (xslDoc.parseError.errorCode <> 0) Then
Dim myErr
Set myErr = xslDoc.parseError
MsgBox ("Ha um erro " & myErr.reason)
Else
Set xslt.stylesheet = xslDoc
xmlDoc.async = False
xmlDoc.Load "C:\Instructional_program.xml"
If (xmlDoc.parseError.errorCode <> 0) Then
Set myErr = xmlDoc.parseError
MsgBox ("You have error " & myErr.reason)
Else
Set xslProc = xslt.createProcessor()
xslProc.input = xmlDoc
'xslProc.Transform
xslProc.output = oStream
xslProc.Transform
oStream.SaveToFile ("c:\Doc_out.xls")
End If
End If
End Sub
Marcos Hercules
I've been trying to view some result through Excel from my xslt. I'm
using adodb to obtain datas in my sheet but nothin's appear, could
anyone tell me what' s going wrong in my vba code?
Dim app As New MSXML2.DOMDocument30
Dim xmlDom, xslDom, projDom, xslFileName As String
Dim xslt As New MSXML2.XSLTemplate30
Dim xslDoc As New MSXML2.FreeThreadedDOMDocument30
Dim xmlDoc As New MSXML2.DOMDocument30
Dim xslProc As IXSLProcessor
Dim xmlout As New MSXML2.FreeThreadedDOMDocument30
Dim oStream As New adodb.Stream
Dim oRecord As New adodb.Recordset
Set oStream = New adodb.Stream
oStream.Open
xslDoc.async = False
xslDoc.Load "c:\compara.xsl"
If (xslDoc.parseError.errorCode <> 0) Then
Dim myErr
Set myErr = xslDoc.parseError
MsgBox ("Ha um erro " & myErr.reason)
Else
Set xslt.stylesheet = xslDoc
xmlDoc.async = False
xmlDoc.Load "C:\Instructional_program.xml"
If (xmlDoc.parseError.errorCode <> 0) Then
Set myErr = xmlDoc.parseError
MsgBox ("You have error " & myErr.reason)
Else
Set xslProc = xslt.createProcessor()
xslProc.input = xmlDoc
'xslProc.Transform
xslProc.output = oStream
xslProc.Transform
oStream.SaveToFile ("c:\Doc_out.xls")
End If
End If
End Sub
Marcos Hercules