[ExI] ai class at stanford

Kelly Anderson kellycoinguy at gmail.com
Wed Aug 24 13:35:56 UTC 2011


2011/8/23 spike <spike66 at att.net>:
> Cool my Norvig textbook arrived today.
>
> Object oriented coding hipsters please: if I have a spreadsheet that can be
> called from a macro within that sheet, how is that any different from a user
> defined function?  I recognize that the macro cannot be separated from the
> spreadsheet, so in that sense it isn’t portable code.  But if you have VBA
> macro code which calculates a value, pastes it into a particular sheet in
> which you have created a model in that sheet, then does a calculate, then
> copies a different cell in that sheet, then that sheet within the workbook
> would fit the definition of either an object or as a user defined function?
> So in that loose sense, a spreadsheet with macros could be considered an
> object oriented language, ja?

Programming Excel extensions can be done in a number of ways, some of
which are object oriented and some of which are not. You can separate
VBA functions into separate files, but that doesn't make them object
oriented. It does make them reusable. You can also write extensions in
C# and other .Net languages, which are object oriented. Eventually,
you have to access them from the spreadsheet, but you can do some
pretty amazing things in the Excel environment. I wrote a Real Time
Data server that fetched values off of the Internet and inserted them
into cells. It was object oriented, and it was pretty fun and cool.
There is so much to understand about Excel that I doubt there are very
many people who fully understand all you can do. I certainly don't.

-Kelly




More information about the extropy-chat mailing list