各位大虾,小弟在做个东西,要到处xml格式的excel,本来内容里面没有中文的话打开时没问题的,但是发现里面一旦包含中文就有问题了,不知道大虾大牛们有没有什么办法可以解决这个问题,小弟感激不敬。其他的地方有中文可以,就红色的那里如果有中文就打开不了了,我觉得应该不是编码的问题,可能是有哪个编码属性要设置一下的,但是没搞过这个东西,不知道在哪里设置。<?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! 大哥</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
<?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! 大哥</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">
<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! 大哥</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>