最簡單的XML格式Excel表格文件
最簡單的XML格式Excel表格文件
當然,還有幾個地方是可以刪除掉的內容,但是這樣就有些破壞完整性了。這個文檔的作用就是從XML數據源中導出數據之后,使用XSLT轉換也可以把數據導出。簡單!
<?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">
<Title>Excel表格</Title>
<LastAuthor>bigtall</LastAuthor>
</DocumentProperties>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Center"/>
<Font ss:FontName="宋體" x:CharSet="134" ss:Size="12"/>
</Style>
</Styles>
<Worksheet ss:Name="tt">
<Table>
<Row>
<Cell ss:MergeAcross="6" ><Data ss:Type="String">Hello!World!</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
其實還可以精簡到這樣:
<?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">
<Worksheet ss:Name="tt">
<Table>
<Row>
<Cell><Data ss:Type="String">Hello!World!</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
其實把名稱空間定義html,o,x三個刪除也好使!![]()

公眾號:老翅寒暑
浙公網安備 33010602011771號