Home | Polski | |
Go back |
A sidebar to the article “A new face for spreadsheets” published in PC Magazine, issue 12/1987, pp. 110. Care to customize? From its file structure to its macro language, Microsoft Excel is a powerful developer’s tool. One very important reason for the PC’s success was open architecture. By building a modular computer with an expansion bus, IBM made it easy for people to plug in their own hardware. This gave the machine tremendous flexibility and took it in directions IBM never thought of. Microsoft has tried to design Microsoft Excel the same way. From its file structure to its macro language to its interprogram communications protocol, Excel was built to be customized. Microsoft has tried to give independent developers the tools to take Excel in as many directions as they took the IBM PC. An enormous amount of development work can be done with the macro language alone. Custom menus and dialog boxes are obvious, flashy ways to make it easier to build models that someone else is going to run. The big headache in applications development, though, is anticipating all the crazy things a complete stranger – the user – might do. A good application has to be ready for anything, and Excel gives you many ways to cope with user craziness. One is a whole series of reconnaissance functions that tell you what’s happening in the worksheet. You can find out a document’s name, what directory it came from, whether it’s protected, what kind of charts it contains, how many columns and rows it uses, its recalc mode, and more. Perhaps most important for developers, you can check if anything has happened to the worksheet since it was last saved. You can get equally detailed information about individual cells: whether they’re values or labels, underlined, boldface, hidden, centered, and so forth. This information means your macros don’t have to run blind, hoping and praying that the user will do the right thing. You can check on what he did before and branch accordingly. If you write in C or FORTRAN, you can use the Register and Call macro commands to run your own programs. If, for example, you had written a routine to do Fourier transformation or to generate Mandelbrot patterns, you could call it from within Excel with a macro. Register and Call can be dangerous. Since you are actually adding them to Excel’s internal command stack, if you don’t use them right, they can run wild and blow up your application. If you are building an application to run under Microsoft Windows, Version 2.0, you can use dynamic data exchange (DDE). Think of DDE as a software bus, analogous to the PC’s expansion bus. It’s a channel for linking different programs and making them work together. Since Excel can take DDE instructions as well as give them, you can make Excel just a small part of a larger application. You could use it as the calculation engine for a financial analysis or database program and run it automatically only when necessary. It would pass results back to the main program via DDE. DDE is custom integration: you get the benefits of integration without being locked into modules you didn’t choose. Finally, even at the unglamorous level of file structure, Excel has kept its architecture open. Its files are in binary form and as machine independent as possible. Files from one environment are meant to work in any other. Version 2 of Excel for the Macintosh, for example, will use the same file format. The file specification is public, so you can start work right now on utilities that manipulate Excel data. Excel comes with all the tools you need to turn out custom applications slick enough to slide uphill. Now all it needs is a user base. | |
Page added on 22nd September 2004. Copyright © 2002-2005 Marcin Wichary |
Printable version | Contact | Site map |