# Is it possible to construct a function to make a poor man's Mathematica database?

I have a function that is set up to write to a database with 10-20 standard variables with 10 fields each, but the application is going to a place where database access is not available. Can Mathematica read an Excel file and pick up the portions of the file that relate to one of these 20 variables, change them if needed and write the whole thing back again? If so, how would that be accomplished? Thanks!

-
Yes. See reference.wolfram.com/mathematica/guide/… You could keep each "table" in a separate Excel file or de-normalize the entire database and store it in a single file. You could also just store everything in CSV. –  Jagra Jun 18 '12 at 22:29
Beware of where you are going ... Excel is not transactional, not multiuser, not robust, ... it is NOT a DB –  belisarius Jun 18 '12 at 22:37
@belisarius Totally agree. I was trying for a read it all in and write it all out type of solution. No transactions available. –  R Hall Jun 18 '12 at 22:55
There is a way to manipulate Excel like you would with VBA: mathematica.stackexchange.com/questions/4594/… –  faysou Jun 19 '12 at 6:14
It's probably much better to go with a real database. Having said that, perhaps you could use Leonid's SQL DSL as a starting point and just operate on mathematica lists, which you could export to a file. –  Ajasja Jun 19 '12 at 8:06

• Use Import and Export to work with Excel files (noted: this is not straightforward with problems mentioned in the comments).