title: Reading Excel Spreadsheet with C#, unequal Column/Values
body: <p>I have an excel spreadsheet output as XML with the columns defined as this:</p>
  
  <pre><code>   &lt;Row ss:AutoFitHeight="0"&gt;
          &lt;Cell ss:StyleID="ColumnHead"&gt;
            &lt;ss:Data ss:Type="String"&gt;#&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="ColumnHead"&gt;
            &lt;ss:Data ss:Type="String"&gt;prefix&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="ColumnHead"&gt;
            &lt;ss:Data ss:Type="String"&gt;name&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="ColumnHead"&gt;
            &lt;ss:Data ss:Type="String"&gt;label&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="ColumnHead"&gt;
            &lt;ss:Data ss:Type="String"&gt;totalLabel&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="ColumnHead"&gt;
            &lt;ss:Data ss:Type="String"&gt;base schema&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="ColumnHead"&gt;
            &lt;ss:Data ss:Type="String"&gt;systemid&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="ColumnHead"&gt;
            &lt;ss:Data ss:Type="String"&gt;prohibit&lt;/ss:Data&gt;
          &lt;/Cell&gt;
        &lt;/Row&gt;
  </code></pre>
  
  <p>And here is one example row:</p>
  
  <pre><code>&lt;Row ss:AutoFitHeight="0"&gt;
          &lt;Cell ss:StyleID="NoBorderNumberCell"&gt;
            &lt;ss:Data ss:Type="Number"&gt;1&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="NoBorderCell"&gt;
            &lt;ss:Data ss:Type="String"&gt;ifrs&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="NoBorderCell"&gt;
            &lt;ss:Data ss:Type="String"&gt;AccountingProfit&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="NoBorderCell"&gt;
            &lt;ss:Data ss:Type="String"&gt;Accounting profit&lt;/ss:Data&gt;
          &lt;/Cell&gt;
          &lt;Cell ss:StyleID="NoBorderCell"/&gt;
          &lt;Cell ss:StyleID="NoBorderCell"&gt;
            &lt;ss:Data ss:Type="String"&gt;full_entry_point&lt;/ss:Data&gt;
          &lt;/Cell&gt;
        &lt;/Row&gt;
  </code></pre>
  
  <p>The problem is, how do I detect which cells are missing which columns?  Is it required that the source have a blank self closing tag for all empty cells in order for me to be able to pair up each column to each value every time?  </p>
  
  <p>How would I manage this situation in C#?  I have the bare minimum right, not sure how to separate it to account for missing columns.</p>
  
  <pre><code> if (reader.Name == "ss:Data")
        {                                       
  
            while (reader.Read())
                 Response.Write(reader.Value);
        }
  </code></pre>