title: How to write long numbers as text with interop.excel
body: <p>I am  using <code>interop.excel</code> dll and creating an Excel file. I am having issues while writing long numbers as text. </p>
  
  <p>Below is the code I am using. I can use apostrophe, but if you look in formula bar, you can see the cell is formatted. </p>
  
  <p>Is there any other way of writing long numbers to an Excel spreadsheet without seeing the formatted value in the formula bar (using <code>numberformat</code>)?</p>
  
  <pre><code>worksheet.Cells[i, j] = "'" + dr[p];
  
  //var startCell = (Excel.Range)worksheet.Cells[i, j]; 
  
  //var endCell = (Excel.Range)worksheet.Cells[i, j]; 
  
  //worksheetRange = worksheet.get_Range(startCell, endCell); 
  
  //worksheetRange.NumberFormat = "#####"; 
  </code></pre>