in reply to Using perl to control spreadsheets

Yeah, Perl is really great for this kind of job.
Use it for extracting and transforming data from a database as tirwhan suggested and know your regular expressions and SQL to unleash even more of its powers :)

Have fun with it!