title: C# Multithreaded Access on Excel File
body: <p>I'm coding on an multithreaded C# Application which provides some statistics for an Excel File.
  I opened the File by following Code:</p>
  
  <pre><code>    private static Excel.Application excelApp = new Excel.Application();
      private static Excel.Workbook workbook = excelApp.Workbooks.Open(path);
      private static Excel.Worksheet worksheet = workbook.ActiveSheet;
      private static Excel.Range range = worksheet.UsedRange;
      private static int totalColumns = worksheet.UsedRange.Columns.Count;
  </code></pre>
  
  <p>To collect the Data out of the columns I'm using one Thread per column.</p>
  
  <pre><code>for (int columnCount = 1; columnCount &lt;= /*range.Columns.Count*/totalColumns; columnCount++)
  {
      Thread worker = new Thread(printSpread);
      worker.Start(columnCount);
  }
  </code></pre>
  
  <p>I got HRESULT: 0x800A01A8 Error if I don't start a new Excel Application in each Thread.
  My question is, do I have to do this or is there an opportunity to use just one Excel Application?
  I do think, there is a problem in accessing the data from just one Application by mulitple Threads, which would explain the COM Exception.
  Thanks for your time and help.</p>