title: How to add new column at the beginning of worksheet to an existing excel using microsoft interop
body: <p>I have an excel with 8 columns. I'm trying to add a new column at the beginning of the worksheet. The existing columns should shift. </p>
  
  <p>Below is the code which I tried:</p>
  
  <pre><code>            OpenExcelWorkbook(@"d:\TLC\TLC3.xlsx");
              _sheet = (Excel.Worksheet)_sheets[1];
  
              _sheet.Select(Type.Missing);
  
              _sheet.Columns.Insert(1, 1);
  </code></pre>
  
  <p>But I'm getting the following error:</p>
  
  <p><em>To prevent possible loss of data, Excel cannot shift nonblank cells off of the worksheet. Select another location in which to insert new cells, or delete data from the end of your worksheet. If you do not have data in cells that can be shifted off of the worksheet, you can reset which cells Excel considers nonblank. To do this, press CTRL+End to locate the last nonblank cell on the worksheet. Delete this cell and all cells between it and the last row and column of your data then save.</em> </p>