Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Import XML produced by MS-Excel?
Message
From
14/05/2004 11:40:52
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00903822
Message ID:
00904110
Views:
31
Thanks Sergey, that's a little snnipet of the XML I have.
<?xml version="1.0"?>
<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>grocco</Author>
  <LastAuthor>grocco</LastAuthor>
  <Created>2004-05-07T20:14:17Z</Created>
  <LastSaved>2004-05-07T20:24:57Z</LastSaved>
  <Company>PERSONAL</Company>
  <Version>10.3501</Version>
 </DocumentProperties>
 <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
  <DownloadComponents/>
  <LocationOfComponents HRef="file:///D:\"/>
 </OfficeDocumentSettings>
 <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  <WindowHeight>10110</WindowHeight>
  <WindowWidth>16380</WindowWidth>
  <WindowTopX>360</WindowTopX>
  <WindowTopY>120</WindowTopY>
  <ProtectStructure>False</ProtectStructure>
  <ProtectWindows>False</ProtectWindows>
 </ExcelWorkbook>
 <Styles>
  <Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </Style>
  <Style ss:ID="s21">
   <NumberFormat ss:Format="mm:ss.0"/>
  </Style>
 </Styles>
 <Worksheet ss:Name="Hoja1">
  <Table ss:ExpandedColumnCount="12" ss:ExpandedRowCount="4589" x:FullColumns="1"
   x:FullRows="1" ss:DefaultColumnWidth="60">
   <Column ss:Index="6" ss:Width="248.25"/>
   <Column ss:Index="9" ss:AutoFitWidth="0" ss:Width="76.5"/>
   <Column ss:Index="11" ss:Width="76.5"/>
   <Row>
    <Cell><Data ss:Type="String">B-363133</Data></Cell>
    <Cell><Data ss:Type="Number">87264</Data></Cell>
    <Cell><Data ss:Type="Number">20021</Data></Cell>
    <Cell><Data ss:Type="Number">20036</Data></Cell>
    <Cell><Data ss:Type="Number">108.96</Data></Cell>
    <Cell><Data ss:Type="String">15% PRO-CAMINOS</Data></Cell>
    <Cell><Data ss:Type="Number">55511</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="DateTime">2004-04-29T09:08:07.160</Data></Cell>
    <Cell><Data ss:Type="Number">530100170000</Data></Cell>
    <Cell><Data ss:Type="Number">30260</Data></Cell>
    <Cell><Data ss:Type="String">soniaflores</Data></Cell>
    <Cell><Data ss:Type="String">Canaco</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">B-363133</Data></Cell>
    <Cell><Data ss:Type="Number">87264</Data></Cell>
    <Cell><Data ss:Type="Number">20021</Data></Cell>
    <Cell><Data ss:Type="Number">20036</Data></Cell>
    <Cell><Data ss:Type="Number">108.96</Data></Cell>
    <Cell><Data ss:Type="String">15% PRO-EDUCACION Y ASISTENCIA SOCIAL</Data></Cell>
    <Cell><Data ss:Type="Number">55513</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="DateTime">2004-04-29T09:08:07.160</Data></Cell>
    <Cell><Data ss:Type="Number">530100170000</Data></Cell>
    <Cell><Data ss:Type="Number">30260</Data></Cell>
    <Cell><Data ss:Type="String">soniaflores</Data></Cell>
    <Cell><Data ss:Type="String">Canaco</Data></Cell>
   </Row>

....  A lot of Rows... 
....  ....
  </Table>
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <PageSetup>
    <Header x:Margin="0"/>
    <Footer x:Margin="0"/>
    <PageMargins x:Bottom="0.984251969" x:Left="0.78740157499999996"
     x:Right="0.78740157499999996" x:Top="0.984251969"/>
   </PageSetup>
   <Selected/>
   <TopRowVisible>484</TopRowVisible>
   <LeftColumnVisible>3</LeftColumnVisible>
   <Panes>
    <Pane>
     <Number>3</Number>
     <ActiveRow>713</ActiveRow>
     <RangeSelection>R714:R719</RangeSelection>
    </Pane>
   </Panes>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
 </Worksheet>
 <Worksheet ss:Name="Hoja2">
  <Table ss:ExpandedColumnCount="0" ss:ExpandedRowCount="0" x:FullColumns="1"
   x:FullRows="1" ss:DefaultColumnWidth="60"/>
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <PageSetup>
    <Header x:Margin="0"/>
    <Footer x:Margin="0"/>
    <PageMargins x:Bottom="0.984251969" x:Left="0.78740157499999996"
     x:Right="0.78740157499999996" x:Top="0.984251969"/>
   </PageSetup>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
 </Worksheet>
 <Worksheet ss:Name="Hoja3">
  <Table ss:ExpandedColumnCount="0" ss:ExpandedRowCount="0" x:FullColumns="1"
   x:FullRows="1" ss:DefaultColumnWidth="60"/>
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <PageSetup>
    <Header x:Margin="0"/>
    <Footer x:Margin="0"/>
    <PageMargins x:Bottom="0.984251969" x:Left="0.78740157499999996"
     x:Right="0.78740157499999996" x:Top="0.984251969"/>
   </PageSetup>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
 </Worksheet>
</Workbook>
>If you post small XML file maybe somebody can give directoin in processing it.

>It's an XML generated by MS-Excel 2003, I didn't have that version in my PCs (to be true, I don't have any version of MS-Excel)...
>I've try this code:
>

>lcXMLFile = GETFILE("XML")
>IF NOT EMPTY(lcXMLFile)
> oXMLAdapter = CREATEOBJECT("XMLAdapter")
> oXMLAdapter.LoadXML(lcXMLFile,.T.)
> ?oXMLAdapter.Tables.Count && 0!! Non Tables...
>ENDIF
>

>Can anybody confirm if I can´t process this kind of XML? The company who provide this file is not responding :S...
>
>
>>It depends on your XML. The XMLAdapter() is also limited in what kind of XML it can process.
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform