According to the comments you have several options:
- Use
Import
andExport
to work with Excel files (noted: this is not straightforward with problems mentioned in the comments). - Use this answer to manipulate the Excel file like it is done in VB.
- Using Leonid's SQL DSLLeonid's SQL DSL as a way to get database like syntax while keeping all the data in Mathematica lists.
I would also like to add that Mathematica comes with a built in, standalone, database called HSQL. Wherever Mathematica exists that database also exists and I wonder if perhaps you missed this when you said that you cannot use databases where this code is going. There is an example of how to set up an HSQL database as well as many example queries here.