NPOI read excel (エクセルファイル開く)


Imports NPOI.HSSF.UserModel
'NPOI Download from here:http://npoi.codeplex.com/releases
Private Sub ReadExcelFile()
   Dim wBook As HSSFWorkbook = Nothing
   Try
      Using file As New FileStream("Excel file path", FileMode.Open, FileAccess.Read)
            wBook = New HSSFWorkbook(file, True)
      End Using
   Catch ex As Exception
         Console.Write(ex.Message)
   End Try
End Sub