如何将2007年创建的SpreadsheetMl转换为2010年



我有一个xml spreadsheetml文档。这是用来通过我的silverlight应用程序创建excel文档的。当通过此模板创建的文件保存为*.xlsx Excel 2010时,会引发错误

"Excel无法打开文件"*.xlsx",因为文件格式或扩展名无效。请验证文件是否已损坏,以及文件扩展名是否与文件格式匹配。">

但是,如果文件保存为.xls或.xml,则没有问题,并且可以通过Excel 2010打开。

<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook 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">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author></Author>
<LastAuthor></LastAuthor>
<Created>2010-10-25T14:17:17Z</Created>
<LastSaved>2010-10-25T14:17:17Z</LastSaved>
<Company></Company>
<Version></Version>
</DocumentProperties>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>12015</WindowHeight>
<WindowWidth>20055</WindowWidth>
<WindowTopX>480</WindowTopX>
<WindowTopY>150</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Horizontal="Left" ss:Vertical="Center"/>
<Borders/>
<Font ss:Color="#000000"/>
<Interior ss:Color="#FFFFFF" ss:Pattern="Solid"/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s21">
<NumberFormat ss:Format="Short Date"/>
</Style>
<Style ss:ID="s22">
<NumberFormat ss:Format="0"/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table>
***
</Table>
</Worksheet>
</Workbook>

如何升级此模板以匹配Excel 2010格式?

此警告是Excel 2007+中扩展强化的结果。

如何升级此模板以匹配Excel 2010格式?

如果不使用能够理解这两种格式的外部应用程序,就无法升级它。SpreadsheetXML和XLSX格式非常不同。

最新更新