
Originally Posted by
jmcilhinney
How many records do you have in total? It may be easiest to simply load the whole sheet into a DataTable and then query that using LINQ.

Originally Posted by
nov0798
I have approximately 400-500 rows of data, and need to display about 8-10 columns of data per vehicle/resource. Ive never heard of LINQ, ill have to look that up.
This is a relatively easy thing to do.
First establish a connection to the Excel File.
Connection string will look something like this.
Next write a query to fetch records from an excel worksheet.
VB Code:
Dim myexcelFile As String = "c:\temp\myfile.xls"
Dim connectStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & myexcelFile & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";"
Dim dataTable As DataTable = PopulateDataTable(connectStr)
Dim con As New OleDbConnection(connectStr)
Const qry As String = "SELECT * FROM [Sheet1$]"
Dim odp As New OleDbDataAdapter(qry, con)
odp.Fill(dt)
Now you have your basic data table. You can use LINQ to manipulate the contents of this table every which way you want.