XML to Excel Transformation
Posted: Mon Jun 29, 2015 9:40 am
Hi,
We have an xslt file which converts XML to Excel.
But when we give the output file extension type as '.xls' we are getting the following warning if we try to open the output excel file.
and when we give the output file extension type as '.xlsx', we are getting an error and the file wouldn't open.
Is this because of the namespaces we gave in the xsl file?
We have an xslt file which converts XML to Excel.
But when we give the output file extension type as '.xls' we are getting the following warning if we try to open the output excel file.
The file you are trying to open, 'abc.xls', is in a different format than specified by the extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
and when we give the output file extension type as '.xlsx', we are getting an error and the file wouldn't open.
Excel cannot open the file 'abc.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
Is this because of the namespaces we gave in the xsl file?
Code: Select all
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40"
>