xml +xsl = html - Cant get the html to be a html!
Posted on 2004-08-31
I get an output from on of our models, in xml format, and i want to bring it into excel via a html (or any other method - please note, i have Office 97 so i doesnt know about xml hence the html bit)
This works fine and dandy in VBScript, but i lost half my hair last night trying to do it in .Net
Dim oXML, oXSLT, FSO, objFile, xlApp
Set oXML = CreateObject("MSXML2.DOMDocument")
Set oXSLT = CreateObject("MSXML2.DOMDocument")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objFile = FSO.CreateTextFile("c:\test\1.html", True)
Set xlApp = CreateObject("Excel.Application")
oXML.async = False: oXSLT.async = False
xlApp.Visible = True
It seems the only thing i could do was trnasform the xml (note file extension is aal) into another xml, that when opened in IE look perfect, but when opening it up in Excel (2003 + 97) it looked just like the original xlm basically. If i manually deleted the <xml......> stuff at the top of the file, then it opened up perfect in Excel, so i guess i was sort of close....
i know i could use Saxon or something similar, but i'd rather not have to include it in the install..