日期:2014-05-18  浏览次数:20376 次

华表CELL XML导入问题
document.all.CellWeb1.ReadFromXML(request.responseText);
已经返回为true了 可是为什么页面并没有显示出来数据呢


帮助文档上也不全  

返回true了 

表格就是没有被填充

JScript code

            var request = new ActiveXObject('Microsoft.XMLHTTP');
            request.open("GET", "XMLFile1.xml", false);
            request.send();

            document.all.CellWeb1.ReadFromXML(request.responseText);



XML code

<Workbook> 
       <DocumentProperties>
           <Created>2004-06-11T00:55:04Z</Created>
           <Version>03.1015</Version>
       </DocumentProperties>
       <Worksheet Name="第1页">
         <Table>
           <Row Index="3">
               <Cell Index="2">
                   <Data Type="Number">1234</Data>
               </Cell>
               <Cell Index="3">
                   <Data Type="Number">4567</Data>
               </Cell>
           </Row>
           <Row Index="4">
                <Cell Index="2">
                     <Data Type="String">asd</Data>
                </Cell> 
                < Cell Index="3">
                     <Data Type="String">ASDF</Data>
                </Cell>
           </Row>
         </Table>
       </Worksheet>
       <Worksheet Name="第2页">
         <Table>
           <Row Index="1">
              < Cell Index="1">
                  <Data Type="Number">1234</Data>
              </Cell>
              <Cell Index="2">
                  <Data Type="Number">4567</Data>
              </Cell>
           </Row>
         </Table>
       </Worksheet>
</Workbook>




------解决方案--------------------
还真没用过,不过你可以先把汉字去掉,不行再用jquery的ajax方式请求下试试,确定数据取出来了,然后确定格式上是否有问题才没有填充。
------解决方案--------------------
XML加上头和编码方式。