I've Built (& am Building).
A Master Random Magic Item Generator with Excel (& OpenOffice Calc).
It has a Sheet for all of the PHB, SPC, & PHBII (In Progress) Spells.
It can be set up to Auto Filter (haven't turned it on yet) based on Level, Class Etc.
It also can randomly generate a Scroll, Wand, or Potion (though the Potions require a little bit of DM lee-way or a lot of re-rolling to get a Core Rules Potionable Spell.
When I get it closer to working, I'd figure I'd try to find a place to store it so people can try it out & give me some feedback on it.
PS. This is a designed for my own, personal use only, so I could care less about the SRD, Open Gaming Agreement, etc.
This also means my house rules are integrated into this, so some things might not match up square.
The file is also quite large.
I might try to see how easy it is to extract the Spell Part from it.