Question: I'm a bit new to web development and wanted some insight on how to approach a project of mine.

We have a large mysql with a fairly large dataset that we want people to be able to play around with. Is there a way to have some sort of web based spreadsheet that, in addition to do normal spreadsheet calculations, query a database and pull down content? We have niche statical information on companies we research, ideally a user would come to the site and be able to access our data while adding their own logic(math operators) to make it more relevant to them.

We don't want to create an api to connect to their desktops(yet) and want to do this entirely over the web.

Any help on the approach or tools you'd use would be greatly appreciated.

Thanks in advance 

Edit: I found a good tool for drupal "Sheetnode" which uses phpexcel....I'll study it, I'm not totally sure if it allows mysql queries to be added within cells.

Answer: 
Give [YUI datatable](http://developer.yahoo.com/yui/datatable/) a try. The YUI library is one of the best-documented libraries. Yes, you can do queries for every cell in the sheet. You can use one query to populate the whole spreadsheet, and then another query for updating each individual cell. You will be responsible for programming the server-side code in Drupal using your own custom module. The menu\_hook in Drupal will allow you to accept RESTful calls from the datatable and JavaScript.
I found phpexcel ( phpexcel.codeplex.com/ ) does what I want and there's a module for drupal for me.