问题描述
我正在尝试将XSLT,XSL文件转换为 .xsl。所以我尝试了以下编码
以下编码 正常工作。但 我打开创建的Excel工作表时 在 XML SPREAD SHEET 2003 中打开。但它应该在 Excel 97-2003工作簿中打开。我怎样才能实现?
我的尝试:
string MyXmlPath = ReportPath + @\ XML\chennai.xml;
dataset.WriteXml(MyXmlPath);
字符串MyExcelPath = ReportPath + @\ Report \宸.x.xls;
XPathDocument xmlDoc = new XPathDocument(MyXmlPath);
XslCompiledTransform XSLTransform = new XslCompiledTransform();
XSLTransform.Load(AppBasePath + @\ Master \ XSLT\chennai.xslt);
XSLTransform.Transform( MyXmlPath,MyExcelPath);
I am trying to Transform the XSLT,XSL file into .xsl . So i tried below coding
Below 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 ?
What I have tried:
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);
这篇关于如何在C#中使用XSLT将xmldocument转换为XLS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!