views:

146

answers:

5

Why are programs like Microsoft Excel, Gnumeric and OpenOffice.org Calc designed with hard-coded limits on the number of rows and columns? This seems like an archaic programming technique from when spreadsheets were considered a demanding application and dynamic memory allocation was considered "high-end". I would guess that it indicates that some resource is being statically allocated, with the assumption that "noone will ever need more than that", thus introducing a very arbitrary limitation into the application. What is the logic behind it?

Note: I know some people are going to argue that this question isn't programming related. Here's a preemptive rebuttal: This question is programming-related because it's asking why a pervasive and seemingly obsolete programming methodology is used.

+2  A: 

The original reason was for performance and space, because (for instance) handling 65536 rows only requires two bytes. These historic reasons have gone with Office 2007 (if not the others as well), so your question is also obsolete.

Oliver Townshend
Not strictly true. They're not really gone, they just got bigger. The limit is now 1048576 (2^20) rows.
John Feminella
@John Feminella: Exactly my point. Yes, it's a larger limit, but it's still an arbitrary, hard-coded limit.
dsimcha
@dsimcha: you really think a spreadsheet is the right tool for processing 100million row datasets? with that kind of universe why not use a real database and sql?
kloucks
Well I'm reliably informed by a friend that the minute you go over 65536 rows, performance goes downhill, so I think your 'arbitrary' statement is wrong. Performance matters.
Oliver Townshend
A: 

If god wanted spreadsheets larger than 65536x65536 he would have made bytes bigger than 8 bits.

Richard Pennington
If you need a spreadsheets larger than 65536x65536 than you should not be using a spreadsheet. (MATLAB, SQL, whatever)
BCS
+1  A: 

Because it's way easier to handle cell references as a pair of indexes and they end up having a limit?

In short, there will be a limit no matter what you do, the question is just what will it be, what will it cost to make it that and how many people will run into it?

BCS
A: 

Next Gnumeric version will allow much larger sheets, up to 8M rows and 8k columns. Just if you really need such large sheets, buy some TBytes of RAM.

Jean Brefort
A: 

In Excel97 biff record,column is stored as 0xff number,row is stored as 0xFFFF numner. So it limite the col to 255 and the row to 65535,if you want to save more rows/cols in Excel2003(if it is support in IDE),it will not be saved.

liya