function View_ParamReport() {
var xmlPathName = inputPath.innerText;
//Based on the input selcted it selectes the particular xslt code and generates the xml output
var xml = new ActiveXObject("Msxml2.DOMDocument.6.0");
xml.async=false;
xml.load(xmlPathName);
var xsl = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.6.0");
xsl.setProperty("AllowDocumentFunction", true);
xsl.async=false;
var xslTemp = new ActiveXObject("Msxml2.XSLTemplate.6.0");
xslTemp.stylesheet = xsl;
var xslProc = xslTemp.createProcessor();
xslProc.input = xml;
try {
xslProc.transform;
var report2= xslProc.output;
var fso = new ActiveXObject("Scripting.FileSystemObject");
var filePath = "C:\\Program Files (x86)\\" + orderNumber + ".xls";
var s = fso.CreateTextFile(filePath, true);
s.WriteLine(report2);
//If I pass some chinese character in the report2 it is //getting corrupted.
//Eg:s.WriteLine("订单编号"); gives ???? in the excel
s.Close();
window.open(filePath);
} catch(e) {
}
}