title: Rename excel worksheet VB.net with Interop
body: <p>I have the below interop code where I use "excel.Worksheets.Add()" to create my sheet in already available excel book (this becomes my active sheet automatically). During this excel assigns a default name automatically. Please let me know every time I add a sheet using "excel.Worksheets.add() I should rename it to a meaningful name. </p>
  
  <pre><code>        Dim excel As Microsoft.Office.Interop.Excel.Application
          Try
          excel = New Microsoft.Office.Interop.Excel.Application
          excel.Workbooks.Open("C:\Satish\TestExcel\vbexcel.xlsx")
          Dim i As Integer, j As Integer
          Dim diff As Integer = 1
          ' if you want column header from dgv elese omit the block 
          '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
          excel.Worksheets.Add()
  
  
          For j = 0 To DataGridView4.ColumnCount - 1
  
  
              excel.ActiveSheet.cells(1, j + 1) = DataGridView1.Columns(j).Name
  
          Next
          diff += 1
  </code></pre>