Data structure used for implementing spreadsheets

 ̄綄美尐妖づ 提交于 2020-01-10 14:19:27

问题


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


回答1:


Maybe, probably, a sparse matrix:

http://en.wikipedia.org/wiki/Sparse_matrix




回答2:


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:

http://contributing.openoffice.org/programming.html




回答3:


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.




回答4:


I expect it to use many.

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




回答5:


Possibly a multi-dimensional array.



来源:https://stackoverflow.com/questions/526096/data-structure-used-for-implementing-spreadsheets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!