首先你需要做一个映射模板,来映射xls文件中所有的列。
如下:

<?xml version="1.0" encoding="UTF-8"?>
<list>
<record>
<company></company>
<logo></logo>
<model></model>
<hight></hight>
<width></width>
<length></length>
<height></height>
<since></since>
<end></end>
<price></price>
<kind></kind>
<color></color>
<selection></selection>
<remarks></remarks>
</record>
<record>
<company></company>
<logo></logo>
<model></model>
<hight></hight>
<width></width>
<length></length>
<height></height>
<since></since>
<end></end>
<price></price>
<kind></kind>
<color></color>
<selection></selection>
<remarks></remarks>
</record>
</list>	
编辑好后,保存为test.xml.先用Excel打开你将要导出数据的.xls文件,【开发工具】-【源】 右下角中有【xml映射】,进去后添加test.xml, 手动对应好映射。(点击左边list的record,然后选中数据表中的第一列),导出即可。下面是导出的数据。


XML语言: 高亮代码由发芽网提供
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <record>
       <company>アトラスピアノ製造株式会社</company>
       <logo>ADELSTEIN</logo>
       <model>AD-ⅢM</model>
       <hight>124</hight>
       <width>63</width>
       <length>151</length>
       <height>250</height>
       <since>1985年4月</since>
       <end>1988年10月</end>
       <price>780000</price>
       <kind>アップライト</kind>
       <color>マホガニー(桃花心木)</color>
       <selection>なし</selection>
       <remarks/>
   </record>
   <record>
       <company>アトラスピアノ製造株式会社</company>
       <logo>ADELSTEIN</logo>
       <model>AD-VⅢM</model>
       <hight>132</hight>
       <width>63</width>
       <length>153</length>
       <height>280</height>
       <since>1985年4月</since>
       <end>1988年10月</end>
       <price>980000</price>
       <kind>アップライト</kind>
       <color>マホガニー(桃花心木)</color>
       <selection>なし</selection>
       <remarks/>
   </record>