Data structure used for implementing spreadsheets

前端 未结 5 541
天命终不由人
天命终不由人 2020-12-31 10:29

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

相关标签:
5条回答
  • 2020-12-31 11:00

    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.

    0 讨论(0)
  • 2020-12-31 11:09

    I expect it to use many.

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

    0 讨论(0)
  • 2020-12-31 11:16

    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

    0 讨论(0)
  • 2020-12-31 11:16

    Possibly a multi-dimensional array.

    0 讨论(0)
  • 2020-12-31 11:18

    Maybe, probably, a sparse matrix:

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

    0 讨论(0)
提交回复
热议问题