I am trying to Transform the XSLT,XSL file into .xsl . So i tried below coding

string MyXmlPath = ReportPath + @"\XML\chennai.xml";
dataset.WriteXml(MyXmlPath);
string MyExcelPath = ReportPath + @"\Report\chennai.xls";

XPathDocument xmlDoc = new XPathDocument(MyXmlPath);
XslCompiledTransform XSLTransform = new XslCompiledTransform();
XSLTransform.Load(AppBasePath + @"\Master\XSLT\chennai.xslt");
XSLTransform.Transform(MyXmlPath, MyExcelPath);

Above Coding is working fine. But when i open the created Excel sheet it is opening in XML SPREAD SHEET 2003. But it should be open in Excel 97-2003 Workbook. How can i achieve ?

Related posts

Recent Viewed