title: Converting "range" type to "integer" in Visual Basic .NET
body: <p>I wrote this codes in vb.net. I want to use this function to plot a simple mathematics operation but this error appears during the compilation. <BR>
  Please help me to correct that..</p>
  
  <pre><code>Imports Excel = Microsoft.Office.Interop.Excel
  
  Public Class Form1
      Function ExcelReader(ByVal Address As String, ByVal SheetName As String, ByVal StartRow As Integer, ByVal EndRow As Integer, ByVal StartColumn As Integer, ByVal EndColumn As Integer) As String(,)
          Dim Contents(EndRow - StartRow + 1, EndColumn - StartColumn + 1) As String
          Dim ExcelInterface As New Excel.Application
          Dim Workbook As Excel.Workbook
          Dim Sheet As Excel.Worksheet
  
          Workbook = ExcelInterface.Workbooks.Open("address")
          Sheet = Workbook.Sheets(SheetName)
  
          For Row As Integer = StartRow To EndRow
              For Column As Integer = StartColumn To EndColumn
                  Contents(Row - StartRow, Column - StartColumn) = Sheet.Cells(Row, Column)
              Next
          Next
  
          Return Contents
      End Function
  End Class
  </code></pre>