midrange.com code scratchpad
Name:
Alan Cassidy
Scriptlanguage:
Plain Text
Tabwidth:
4
Date:
05/20/2014 07:17:54 pm
IP:
Logged
Description:
This is for the discussion on using XML-INTO for parsing an XML-XLSX file, subject line:
RE: Parsing an XML-XLSX file using XML-INTO ---Second code posting
First occurence of "<Row" has a title I'll use in code
Second is shown for comparison
Then skip the next four to the seventh "<Row".
Code:
  1.    <Row ss:Height="23.25" ss:StyleID="s131">
  2.     <Cell ss:StyleID="s130"><Data ss:Type="String">Daily Summary for the month of May 2014</Data><NamedCell
  3.       ss:Name="Print_Area"/></Cell>
  4.     <Cell ss:Index="29" ss:StyleID="s177"/>
  5.     <Cell ss:StyleID="s177"/>
  6.     <Cell ss:StyleID="s177"/>
  7.     <Cell ss:StyleID="s177"/>
  8.     <Cell ss:StyleID="s177"/>
  9.     <Cell ss:StyleID="s177"/>
  10.     <Cell ss:StyleID="s177"/>
  11.     <Cell ss:StyleID="s177"/>
  12.     <Cell ss:Index="63" ss:StyleID="s177"/>
  13.    </Row>
  14.    <Row ss:AutoFitHeight="0" ss:Height="33.75"/>
  15.    <Row>
  16.     <Cell ss:StyleID="s132"><Data ss:Type="String">Sum of Amount</Data><NamedCell
  17.       ss:Name="Print_Area"/></Cell>
  18.     <Cell ss:StyleID="s132"><Data ss:Type="String">Billing Company3</Data><NamedCell
  19.       ss:Name="Print_Area"/></Cell>
  20.     <Cell ss:StyleID="s201"><Data ss:Type="String">Billing Company2</Data><NamedCell
  21.       ss:Name="Print_Area"/></Cell>
  22.     <Cell ss:StyleID="s201"><Data ss:Type="String">Bank</Data><NamedCell
  23.       ss:Name="Print_Area"/></Cell>
  24.     <Cell ss:StyleID="s201"><Data ss:Type="String">Trans Type</Data><NamedCell
  25.       ss:Name="Print_Area"/></Cell>
  26.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  27.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  28.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  29.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  30.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  31.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  32.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  33.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  34.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  35.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  36.     <Cell ss:StyleID="s201"><NamedCell ss:Name="Print_Area"/></Cell>
  37.     <Cell ss:StyleID="s201"/>
  38.     <Cell ss:StyleID="s201"/>
  39.     <Cell ss:StyleID="s202"/>
  40.    </Row>
  41. <!-- 
  42. [.....skip a few heading rows and column groupings....]
  43. [.....Date2 starts the column headings....]
  44. -->
  45. <Row>
  46.     <Cell ss:StyleID="s132"><Data ss:Type="String">Date2</Data><NamedCell
  47.       ss:Name="Print_Area"/></Cell>
  48.     <Cell ss:StyleID="s132"><Data ss:Type="String">ACH Credits</Data><NamedCell
  49.       ss:Name="Print_Area"/></Cell>
  50.     <Cell ss:StyleID="s206"><Data ss:Type="String">Lockbox Deposits</Data><NamedCell
  51.       ss:Name="Print_Area"/></Cell>
  52.     <Cell ss:StyleID="s199"><NamedCell ss:Name="Print_Area"/></Cell>
  53.     <Cell ss:StyleID="s132"><Data ss:Type="String">ACH Credits</Data><NamedCell
  54.       ss:Name="Print_Area"/></Cell>
  55.     <Cell ss:StyleID="s206"><Data ss:Type="String">Lockbox Deposits</Data><NamedCell
  56.       ss:Name="Print_Area"/></Cell>
  57.     <Cell ss:StyleID="s199"><NamedCell ss:Name="Print_Area"/></Cell>
  58.     <Cell ss:StyleID="s132"><Data ss:Type="String">ACH Credits</Data><NamedCell
  59.       ss:Name="Print_Area"/></Cell>
  60.     <Cell ss:StyleID="s206"><Data ss:Type="String">Adjustments</Data><NamedCell
  61.       ss:Name="Print_Area"/></Cell>
  62.     <Cell ss:StyleID="s206"><Data ss:Type="String">Lockbox Deposits</Data><NamedCell
  63.       ss:Name="Print_Area"/></Cell>
  64.     <Cell ss:StyleID="s199"><NamedCell ss:Name="Print_Area"/></Cell>
  65.     <Cell ss:StyleID="s132"><Data ss:Type="String">ACH Credits</Data><NamedCell
  66.       ss:Name="Print_Area"/></Cell>
  67.     <Cell ss:StyleID="s199"><NamedCell ss:Name="Print_Area"/></Cell>
  68.     <Cell ss:StyleID="s199"><NamedCell ss:Name="Print_Area"/></Cell>
  69.     <Cell ss:StyleID="s132"><Data ss:Type="String">ACH Credits</Data><NamedCell
  70.       ss:Name="Print_Area"/></Cell>
  71.     <Cell ss:StyleID="s206"><Data ss:Type="String">Lockbox Deposits</Data><NamedCell
  72.       ss:Name="Print_Area"/></Cell>
  73.     <Cell ss:StyleID="s199"/>
  74.     <Cell ss:StyleID="s199"/>
  75.     <Cell ss:StyleID="s205"/>
  76.     <Cell ss:Index="56" ss:StyleID="s178"/>
  77.     <Cell ss:StyleID="s183"/>
  78.     <Cell ss:StyleID="s182"/>
  79.    </Row>
  80. <!-- 
  81. [.....Then there are a lot more rows I don't care about....]
  82. [.....Stop skipping when I get to a row where the first data is column heading "AsOfDate"....]
  83. -->
  84.    <Row>
  85.     <Cell><Data ss:Type="String">AsOfDate</Data><NamedCell
  86.       ss:Name="_FilterDatabase"/></Cell>
  87.     <Cell><Data ss:Type="String">BankId</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>
  88.     <Cell><Data ss:Type="String">AccountNumber</Data><NamedCell
  89.       ss:Name="_FilterDatabase"/></Cell>
  90.     <Cell><Data ss:Type="String">AccountName</Data><NamedCell
  91.       ss:Name="_FilterDatabase"/></Cell>
  92.     <Cell><Data ss:Type="String">BaiControl</Data><NamedCell
  93.       ss:Name="_FilterDatabase"/></Cell>
  94.     <Cell><Data ss:Type="String">Currency</Data><NamedCell
  95.       ss:Name="_FilterDatabase"/></Cell>
  96.     <Cell><Data ss:Type="String">Transaction</Data><NamedCell
  97.       ss:Name="_FilterDatabase"/></Cell>
  98.     <Cell><Data ss:Type="String">Amount</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>
  99.     <Cell><Data ss:Type="String">ZeroDayFloat</Data><NamedCell
  100.       ss:Name="_FilterDatabase"/></Cell>
  101.     <Cell><Data ss:Type="String">OneDayFloat</Data><NamedCell
  102.       ss:Name="_FilterDatabase"/></Cell>
  103.     <Cell><Data ss:Type="String">TwoDayFloat</Data><NamedCell
  104.       ss:Name="_FilterDatabase"/></Cell>
  105.     <Cell><Data ss:Type="String">Reference</Data><NamedCell
  106.       ss:Name="_FilterDatabase"/></Cell>
  107.     <Cell><Data ss:Type="String">Description</Data><NamedCell
  108.       ss:Name="_FilterDatabase"/></Cell>
  109.     <Cell><Data ss:Type="String">Bank</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>
  110.     <Cell><Data ss:Type="String">Trans Type</Data><NamedCell
  111.       ss:Name="_FilterDatabase"/></Cell>
  112.     <Cell><Data ss:Type="String">Billing Company</Data><NamedCell
  113.       ss:Name="_FilterDatabase"/></Cell>
  114.     <Cell><Data ss:Type="String">Date</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>
  115.     <Cell><Data ss:Type="String">Lockbox #</Data><NamedCell
  116.       ss:Name="_FilterDatabase"/></Cell>
  117.     <Cell><Data ss:Type="String">Adj + Lockbox $</Data><NamedCell
  118.       ss:Name="_FilterDatabase"/></Cell>
  119.     <Cell><Data ss:Type="String">Lockbox #2</Data><NamedCell
  120.       ss:Name="_FilterDatabase"/></Cell>
  121.    </Row>
  122. <!-- 
  123. [.....Then come any number of detail rows with data....]
  124. [.....I think that gets the idea...]
  125. -->
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
© 2004-2019 by midrange.com generated in 0.007s valid xhtml & css