title: SpreadsheetGear get column by name?
body: <p>I'm just starting to work on a project that uses SpreadsheetGear. CopyFromDataTable is used to get all the data from a database. There are a lot of fields to work with; we're formatting them, hiding certain ranges if they're empty, etc. As an example:</p>
  
  <pre><code>SpreadsheetGear.IRange cells = worksheet.Cells;    
  cells["G1"].EntireColumn.NumberFormat = "m/d/yyyy";
  </code></pre>
  
  <p>So if the the columns are rearranged or one is removed, it appears I'd have to go back and adjust all of the hardcoded values to reflect the cell shift. Is there any way to reference the column by its first cell's name to possibly make things more modular?</p>
  
  <p>I found <a href="http://SpreadsheetGear.IRange%20cells%20=%20worksheet.Cells;" rel="nofollow">this</a>, but it still requires hardcoding the column.</p>