title: OpenXML reading from spreadsheet stuck on first row
body: <p>I am running some openXML based code in c sharp that's stuck on the first row of data and just loops it again and again. I'm clear that I need to incorporate the row variable into the mix but have tried various methods to no avail. Anyone have any ideas on this?</p>
  
  <p>In the code block below, sst.ChildElements[7].InnerText gets back the content of the first row column 7 but each time the row loops its the content from the same CELL! I want to move onto the next row :-(</p>
  
  <pre><code>string fileName = @"c:\temp\accountData.xlsx";
  
  using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
  {
      using (SpreadsheetDocument doc = SpreadsheetDocument.Open(fs, false))
      {
          WorkbookPart workbookPart = doc.WorkbookPart;
          SharedStringTablePart sstpart = workbookPart.GetPartsOfType&lt;SharedStringTablePart&gt;().First();
          SharedStringTable sst = sstpart.SharedStringTable;
  
          WorksheetPart worksheetPart = workbookPart.WorksheetParts.First();
          Worksheet sheet = worksheetPart.Worksheet;
  
          var cells = sheet.Descendants&lt;Cell&gt;();
          var rows = sheet.Descendants&lt;Row&gt;();
  
          Console.WriteLine("Row count = {0}", rows.LongCount());
          Console.WriteLine("Cell count = {0}", cells.LongCount());
  
          CompanyProvider cp = _db.GetCompanyProvider();
          int i = 0;
  
          // Or... via each row
          foreach (Row row in rows.ToList())
          {
              if (i == 0)
                  i = i + 1;
              else
              {
                  CustomerAddress customerAddress = new CustomerAddress();
                  customerAddress.AddressLine1 = sst.ChildElements[7].InnerText; // Code hidden for brevity
  
                  i = i + 1;
              }
          }
      }
  }
  </code></pre>