Google Spreadsheets, ASP.NET and Excel

Tags:

I’ve lately been using Google Spreadsheets to display project costs to my clients etc., and for that it’s quite nice. Quite similar to Excel, too, so it was easy to get going.

What bothers me to no end, though, is that editing spreadsheets does not work in Opera at all. Why is it? It works in Internet Explorer, which means there can’t be any totally hardcore (like Gandalf-level) JS magic or other stuff going on… I’ll just say that Google is plain and simple lazy.

Being a programmer myself, using such an impressive web app naturally got me thinking how much work it would be to build something similar to Google Spreadsheets…

Clone Excel in JavaScript

Basically the task would be to clone Excel in JS. That’s what Google Spreadsheets does. Now, I’m not sure how much of the magic they are doing in JS, and how much of it is actually being done on the server and then updated on the client with Ajax.

Spreadsheets works surprisingly quickly even when using formulas, although updating them sometimes takes a while, which would lead me to believe they’re actually doing the major legwork on the server. Doing all the stuff Excel does, be it in JS or at the server with some other language, is a lot of work. Of course, I’d like to simplify the task as much as possible…

What if you could just put Excel on the web?

You know, get the Excel application running inside the browser. Well, there’s probably some ActiveX thingy for IE for doing that, but we’d like it to actually work in Opera too. And maybe Firefox, if we’re not feeling lazy ;)

With ASP.NET you actually can control an Excel instance! There’s information on the web about generating Excel spreadsheets through ASP.NET, and what if we could apply that info, create some Google Spreadsheets -style JS grids… and we’d have an online poor man’s Excel in no time!

You could simply use the JS grid in the browser and send all the stuff the user types in the columns to the server, along with info like which column this was etc.. The server would then talk to Excel, modifying the columns in the spreadsheet. Then, Excel would do its magic, and the server would simply reply back, telling the client which columns changed, what data is in them now and things like that.

At least in theory the above could work. I haven’t used ASP.NET Excel interop, but seeing that you can generate Excel docs, this should be very much doable, too. Sadly I don’t have access to a server where I could test this… but perhaps some day, when I also have more free time to play with interesting things like this :)