export to excel using xslt when the column name contains blank?? [modified]
-
Hello: I am now creating an excel file using xslt with the code below: dim objFsXML as System.IO.StringReader dim objXmlTxtWrt as System.Xml.XmlTextReader dim objXPath as System.Xml.Xpath.XpathDocument dim objXslTran as System.Xml.Xsl.XslTransform 'Create Output Stream to write the file to disk objFsXML = New System.IO.FileStream(strExcelFile,System.IO.FileMode.Create) objXmlTxtWrt = New XmlTextWriter(objFsXML,System.Text.Encoding.Unicode) 'Create Xpath Doc to be given as used while doing the XSL Trannsfor objStrRdr = New StringReader(dsDataSet.GetXml) objXmlTxtRdr = New XmlTextReader(objStrRdr) objXPath = New XPath.XPathDocument(objXmlTxtRdr) objXslTran = New Xsl.XslTransform objXslTran.Load(strXSLTempFile)' here throws exception However, when there is a blank or a special char in one of my headers, i've got an invalid xpath expression which throw an exception what can i do ? thx -- modified at 22:55 Wednesday 23rd August, 2006