title: Loop through Excel worksheets and save text into a TXT file with C#
body: <p>I have most of the problem solved. I can loop through the worksheets, I can create the text file and write to it. The only problem I'm having is actually extracting the text or values from every sheet. Below is the code I have, but it only throws an object per worksheet and writes those words into my text file instead of the actual values. </p>
  
  <pre><code>System.Object[,]
  System.Object[,]
  </code></pre>
  
  <p>What else am I missing?
  I should point out I'm a beginner programmer.</p>
  
  <p>Here's the code I have so far:</p>
  
  <pre><code>using (StreamWriter sw = File.CreateText("ExtractedText.txt"))
  {
      Excel.Application xlApp = new Excel.Application();
      Excel.Workbook thisWkBook = xlApp.Workbooks.Open(thisFile);
  
      foreach (Excel.Worksheet sheet in thisWkBook.Worksheets)
      {
          sw.WriteLine(sheet.UsedRange.Value);
      }
  }
  </code></pre>
  
  <p>Any ideas? Thanks!</p>