12.07.2015 Views

Excel Add-in Development in C/C++: Applications in ... - F9

Excel Add-in Development in C/C++: Applications in ... - F9

Excel Add-in Development in C/C++: Applications in ... - F9

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8 <strong>Excel</strong> <strong>Add</strong>-<strong>in</strong> <strong>Development</strong> <strong>in</strong> C/<strong>C++</strong>1.7 SCOPE AND LIMITATIONSThe early chapters are <strong>in</strong>tended to give just enough <strong>Excel</strong> and VBA background for thelater chapters. There are literally dozens of books about <strong>Excel</strong> and VBA rang<strong>in</strong>g fromthose whose titles are <strong>in</strong>tended to coerce even the most timid out of the shadows, tothose with titles designed to make them a must-buy for MBA students, such as ‘EssentialPower <strong>Excel</strong> Tips For Capta<strong>in</strong>s Of Industry And Entrepreneurs’. (At the time of writ<strong>in</strong>g,this was a fictitious book title.) There are, of course, many well-written and comprehensivereference books on <strong>Excel</strong> and VBA. There are also a number of good specialist booksfor people who need to know how best to use <strong>Excel</strong> for a specific discipl<strong>in</strong>e, such asstatistical analysis, for example.The book is primarily focused on writ<strong>in</strong>g add-<strong>in</strong> worksheet functions. The reasons forthis are gone <strong>in</strong>to <strong>in</strong> later sections, such as section 2.8 Commands versus functions <strong>in</strong><strong>Excel</strong> on page 19. One reason is that commands often rely on the creation of user-def<strong>in</strong>eddialogs, which is a task far better suited to VBA. Even if the functionality that yourcommand needs is already written <strong>in</strong> C/<strong>C++</strong> code <strong>in</strong> a DLL, it can still easily be accessedfrom VB. Another reason is that, <strong>in</strong> general, commands do not have the same speedof execution requirements as worksheet functions – one of the ma<strong>in</strong> reasons for us<strong>in</strong>g aC/<strong>C++</strong> DLL for functions.Commands are covered to a certa<strong>in</strong> extent, nevertheless. They can be a useful part ofa well planned <strong>in</strong>terface to a DLL. Know<strong>in</strong>g how to create and access them without theuse of VB is important. Know<strong>in</strong>g how to create menus and menu items is important ifyou want DLL commands to be accessed <strong>in</strong> a seamless way. Chapter 8 Access<strong>in</strong>g <strong>Excel</strong>Functionality Us<strong>in</strong>g the C API on page 169 covers these topics.The <strong>Excel</strong> COM <strong>in</strong>terface is largely beyond the scope of this book, ma<strong>in</strong>ly to keep thebook focused on the writ<strong>in</strong>g of high performance worksheet function, which COM doesnot help with. The other ma<strong>in</strong> reason is that if you need functionality that COM providesand the C API does not, for example, access to certa<strong>in</strong> <strong>Excel</strong> objects, you are probablybetter off us<strong>in</strong>g VBA.This book is not <strong>in</strong>tended to be <strong>in</strong>dustry-specific or profession-specific except <strong>in</strong> the f<strong>in</strong>alchapter where applications of particular <strong>in</strong>terest <strong>in</strong> certa<strong>in</strong> areas of f<strong>in</strong>ance are discussed.It should be noted that the book is not <strong>in</strong>tended to be a f<strong>in</strong>ance text book and deliberatelyavoids laborious explanations of th<strong>in</strong>gs that f<strong>in</strong>ance professionals will know perfectlywell. Nor are examples <strong>in</strong>tended to necessarily cover all of what is a very broad field.It is hoped that readers will see enough parallel with their own field to be able to applyearlier sections of the book to their own problems without too much consternation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!