title: looping read excel data
body: <p>I need to loop the read data from excel to vb.net and when I reach the last row/column "!@#$%^&amp;*()" the excel data will stop read. How can I do that? </p>
  
  <pre><code>Imports Excel = Microsoft.Office.Interop.Excel
  Public Class Form1
      Dim xlApp As Excel.Application
      Dim xlWorkBook As Excel.Workbook
      Dim xlWorkSheet As Excel.Worksheet
      Dim xRange As Excel.Range
      Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      End Sub
      Private Sub cmdGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGenerate.Click
          'Dim row As String
          Dim empty_cell_ctr As Integer = 0 '5
          Dim end_of_xlsheet As Boolean = False
          Dim sRow As Integer 'start row
          Dim col_end As Integer 'col W
          '
          'loading excel(open and read)
          xlApp = New Excel.ApplicationClass
          xlWorkBook = xlApp.Workbooks.Open("c:\sample.xls")
          xlWorkSheet = xlWorkBook.Worksheets("Timesheet")
          xlApp.Visible = True
  
          While Not end_of_xlsheet
  
             If sRow = "'!@#$%^&amp;*()_+" Then
                  xRange = xRange.Cells(sRow, col_end)
                  end_of_xlsheet = False 'end of sheet
                  Continue While
             End If
  
             sRow += 1
  
          End While
  
          MessageBox.Show(sRow)
      End Sub
  End Class
  </code></pre>