How to Query data in excel file from vb .net

Judo Tom

Member
Joined
Oct 24, 2002
Messages
7
Hello,

I am going to write a program where the user can dynamically build a query to find data that is stored in an excel worksheet.

I do not know the best way to go about this.
should I bring the data into a different format first?
Should i just use excel and build statements within the excel worksheet?

The data will always be the same
The query will always change
The query must be built on the screen by the user.
The query will not always use the same columns
The query will not always use the same amt of columns

any ideas please share.

my first idea is to just build excel statements to accomplish all of this within excel by sending the columns needed and the values then use excel and maybe some vba to get the list i need then send the list back to vb long and dirty but i know i can get it to work

the 2nd idea i have is to read in all the columns i need and then sort and do all the logic within vb. probably much faster but i am working with about 30 columns and 9500 rows

Thanks again
 
Thanks Derek.

incase anyone is interested this is the approach i am going to take.
first some background

i have an excel sheet with data for 9500 banks (rows) and about 30 fields (columns)

I am going to go one "field" at a time and compare the banks data with the value entered by the user if it should qualify then i am setting the AA column to 99
i then sort the entire sheet on column aa and delete everything below that and repeat until the user is satisfied
this is dirty and not the best way to go about this but the boss man needs it soon so this will get that done.

it does allow a great amount of flexibility for the user because he can see the banks that qualify as he continues to narrow the group down

thanks for the help
 
Back
Top