Data structure used for implementing spreadsheets

What is the data structure used by spreadsheets program like ms-excel?


Maybe, probably, a sparse matrix:

While it is not exactly Excel, Open Office's Spreadsheet program is open source. It's a fairly large code base but nevertheless giving it a peek might give you a better understanding of how such an application is implemented:

I got this question in an interview today.

The answer they were looking for (because I asked the interviewer at the end) was to implement a class structure that used multiple objects; formulas, references, and numerics.

Not much more detail to offer but suffice it to say that programs like google docs are much more interesting (to code) than they seem.

I expect it to use many.

For example, an AST to recalculate formulas (see this question).

Possibly a multi-dimensional array.

Need Your Help

How to control order of the tabs in the template selection of SharePoint site creation page?

sharepoint moss sharepoint-2007 wss-3.0

The New SharePoint Site page has a Template Selection section which can contains multiple tabs. For example, Meetings and Collaboration. These are controlled in webtemp.xml using DisplayCategory. ...

Keeping track of reports printed in SQL database

sql-server table view records

I have a MS SQL database that I am working on, within this database I have a view that queries information to be printed on a INITIAL letter (sent one time). My idea is to have a table that stores ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.