title: How do I Change the Sheet Name from C# on an Excel Spreadsheet
body: <p>I have a C# application where I am creating numerous Excel Files from Data in a Database. This part is working fine.  However, my user asked if the sheet tab could be modified to reflect a field from the database.  This sounds simple, however, when I try to reset the name, it tells me that it is read only and cannot be set.  I have tried the following and it has not worked:</p>
  
  <pre><code>xlApp.Sheets[0].Range["A1"].Value = "NewTabName";
  </code></pre>
  
  <p>ALSO TRIED:</p>
  
  <pre><code>xlApp.Name = "NewTabName";
  </code></pre>
  
  <p>I did a google search and saw some other approaches which did not work for me as well.  And a few responses indicated that it is readonly and could not be done.  </p>
  
  <p>This seems like something that should be simple.  How can I do it.</p>