VSTO & .NET & Excel

May 19, 2009

The 2nd Edition of Professional Excel Development (PED) is available!

Filed under: .NET Books, VSTO Books — Dennis Wallentin @ 4:30 pm

General
The book “Professional Excel Development” (aka “PED”) is now available in the second edition. The major news is that .NET including VSTO has been added to the book. Because I’m responsible for the .NET section in the book the list of authors now also includes my name too.

2nd PED

For some weeks ago Ross McLean had the kindness to make an interview me. Instead of repeating what I said in the interview you can read the full story here. However, I would like to thank Rob Bovey  for being an excellent teamleader for this edition. Another person I would also like to thank is Gabhan Barry (a Program Manager in the Excel group at Microsoft) who made the technical review on the .NET chapters.

New Chapters
The second editions includes five new chapters:

Chapter 10 - The Office 2007 Ribbon User Interface:
This chapter cover the Ribbon UI paradigm and discuss some advanced problem solving with the new UI.

Chapter 11 – Creating Cross-Version Applications:

In view of the fact that the Ribbon UI was introduced with Excel 2007 and that Windows Vista differ from Windows XP we decided to add this chapter. It covers how to create applications that target both Excel 2003 and previously versions and Excel 2007. We also discuss the major differences between the two operating systems.

Chapter 24 – Excel and VB.NET:
In the first part we introduce the IDE in detail and cover some basic VB.NET programming. In the second part of the chapter we discuss how to automate Excel with VB.NET.
The chapter present a practical case, PETRAS Report Tool.NET which is a standalone utility to retrieve data from PETRAS SQL Server database and populate some Excel reports templates.

Chapter 25 – Writing Managed COM Add-ins with VB.NET:
This chapter is the “flag ship” of the .NET section and goes in detail on how to create managed COM Add-ins and it also discuss in detail Automation Add-ins.
Here we also port the practical standalone utility, PETRAS Report Tool.NET. to a managed COM Add-in.

Chapter 26 – Developing Excel Solutions with Visual Studio Tools for Office System (VSTO):
In the first part of the chapter we set focus on two questions: What is VSTO and When to use VSTO. We also discuss VSTO add-ins, VSTO workbooks and how to deploy a VSTO workbook via the Web with the ClickOnce technology. To leverage the content in this chapter it requires that you have access to Excel 2007.

To buy the book or not?
If you have an interest in Excel and .NET including VSTO then you should consider buying the second edition. However, if your concern is native Excel and VBA then it is better that you save the money and wait until the next edition of the book is available.

If you want to buy or rank the book then please click here

PED’s site
With this edition we decided to build a completely new site for the book with Q&A forums. The intention with the site is to allow you to interact with the authors and leave suggestions for future editions of the book. The Q&A forums are built around the book’s content and they have a similar structure as the book’s TOC. In addition, it is here you will find information about updates and more downloads. 
We strongly encourage you to become a member and discuss the book in detail. Rob and I will try to answer all questions to the best of our knowledge. At the same time we feel it is important to state that the site is not a general Q&A forum about the involved technologies.

Together with the publisher we have made two chapters available for free download. To find out more please visit the PED’s site.

Let me know if you want any further information.

Kind regards,
Dennis

January 20, 2008

RibbonX: Customizing the Office 2007 Ribbon – Review

Filed under: .NET Books, VSTO Books — Dennis Wallentin @ 10:52 pm

Title:
RibbonX: Customizing the Office 2007 Ribbon
Authors:
Robert Martin, Ken Puls, Teresa Henning (Oliver Stohr)
Publisher:
Wiley
Year:
2007
Target group:
According to me: Power user to professional VBA-developers
Targeting softwares in the Office suite:
Excel 2007, Word 2007 and Access 2007
Ranking:
7.5 (out of 10)

Comments
This book is the first of its kind as it explicit only target the RibbonX and how to manipulate and customize it. It covers how to work with RibbonX in Access, Excel and Word.

According to the book itself it contains two parts but for me it contains three parts where the first part serves as an introduction to RibbonX, XML and VBA. The second part is a walkthrough of the RibbonX’s object model and the final part leverage the preceding parts as well as cover some advanced topics.

Part I
The authors present the Ribbon UI and discuss its pros and cons. As we all know, new things solve some issues but also at the same time create new issues and the Ribbon UI is no exception from that rule. Two important tools are also presented, the Custom UI Editor and XML Notepad which is probably not so known among VBA-developers. Together with the presentation of the tools the tools’ pros and cons are also being discussed. ‘XML for RibbonX’ is also presented here together with a chapter for beginners of VBA.  

I find it to be good that the authors actually also discuss the shortcomings of new technologies and tools. The introduction is well written but does not give a ‘clear picture’ for the remaining parts of the book as it tries to target all groups from ‘novice to professional’.

Part II
This part is the backbone of the book as it describe the RibbonX’s objects model in detail and provides us with a great number of examples for Excel, Word and Access. Whenever there is a discrepancy between the softwares, on how they handle the RibbonX’s object model or how the XML files needs to be written, we are given examples that cover it. The presentations of the objects are strictly and a lot of data about the objects are given.

All the chapters are well written and it covers all aspects of the RibbonX’s objects model. It can be a little bit confusing when focus is switched from one software to another one but the authors have managed to keep it together.

Make sure You got the book available when developing RibbonX’s solutions as You need to go back to this part on a regular basis.

Part III
In this part the authors put things together and provide us with practical cases as well with some advanced topics on both VBA and on how to customize the RibbonX.

Here You will find some interesting aspects such as creating UI for Web Service and to work with contextual controls, keytips & keyboard shortcuts as well as how to share and deploy ribbon customizations. By the way, the chapter ‘Sharing and Deploying Ribbon Customizations’ is excellent.

For me this part of the book is the best part. In these chapters the authors push the customization of the RibbonX to the limit but also at the same point out some ‘traps’ to avoid.

Missing entries
The following aspects would have been nice to take part of:

I consider the RibbonX UI design to be very important. Therefore I was surprised that the book didn’t cover or at least discussed best practice for Ribbon UI design.

The book discusses reading and writing settings to Windows registry which is good. The way security is implemented in Windows Vista that approach may not always be the best alternative. On the .NET platform we use XML files for various tasks and since RibbonX rely on XML it would have been natural to also cover XML files to store settings in.

A book that explicit focus on how to customize the RibbonX should at least have some part that introduce RibbonX developing on the .NET platform. It becomes more important when it exist some shortcomings via VBA which the book also discuss.

Special kudos to the authors for:

  • Emphasizing on functionality and by doing so they don’t get ‘carried away’. 
  • Recommend to use a table-driven approach when customizing the RibbonX.
  • RibbonX Naming Convention which is based on RVAB naming conventions. This is a good start in order to create a standard on how we name the RibbonX’s object model in code. We may not necessary agree but it allow us to discuss the subject.
  • The tool, imageMSO Reference, which allows us to lookup imageMSO and gets the XML code for the selected imageMSO. Of course, I would be very pleased if it had been created as a managed COM add-in but that’s another story. 

Summarize
This book provides us with a depth on how to control the RibbonX and it does it well. 

If You are a serious VBA developer who target Access 2007 /  Excel 2007 / Word 2007 then this book is a must have.

Kind regards,
Dennis

November 1, 2006

.NET Books

Filed under: .NET Books — Dennis Wallentin @ 8:42 pm

Internet is for many individuals their number #1 source when it comes to information of all kind. It’s usually an inexpensive and a fast way to get wanted information and if not found then there exist a great number of Q&A forums.

Despite the easy access via Internet I still prefer to read printed books, especially when it’s about new areas of interest. For me the main advantages for using printed books are:

  • They usually give more input on ‘why and when’ then just ‘how’ which is important to get a better understanding from a broader perspective.
  • They have been reviewed both from a technical point of view as well as from a general view. Most publishers have an errata page for each book which is regular updated  and the code used in the book is available for download.
  • I can bring the books with me where ever I want as they  are available without the demand of a computer.
  • They allow me to make marks and comments whenever I want to do it.
  • They have become less expensive for the last years (at least in Sweden).
  • They can be sold in second hand.

When it comes to publishers within the field of programming I prefer the following:

  • Addison Wesley 
  • APress
  • Wiley 
  • Wrox

For me these publishers stands for high quality and offer many times books that are above the average level and also avoid ‘gracefully’ to try to cover ‘every aspects’ on the subjects.

Visual Basic.NET

Professional VB 2005 
Authors: Bill Ejven et al 
Publisher: Wrox
Pages: 1015
ISBN: 0-7645-7536-8
Target audience: Experienced classic VB/VBA developers

The book introduces the readers to .NET Framework, VB.NET, Security and Error handling, ADO.NET and ASP.NET. This book is good although it cover, in my opinion, to wide number of areas. I prefer books where the author(s) focus on few areas in order to get a deep on the subjects.

Pro VB 2005 and the .NET 2.0 Platform
Author: Andrew Troelsen
Publisher: Apress
Pages: 990
ISBN: 1-59059-578-5

Ever since I read Andrew Troelsen’s book ‘COM and .NET Interoperability’ I like his writing style and this one does not get me disappointed. Like the above book from Wrox it tends to cover too many areas but not as much as the one above.

If You consider which book to choose between these two books then I strongly recommend to select this book. Especially as it cover in one chapter (in an understandable way) COM and .NET Interoperability.

Pro .NET 2.0 Windows Forms and Custom Controls in VB 2005
Author: Matthew MacDonald
Publisher: Apress
Pages: 961
ISBN 1-59059-694-3
Target audience: Intermediate – Advanced

In many ways this is an excellent book on the subject and offer also two very good appendix about ‘Creating Usable Interface’ and ‘ClickOnce’.  It’s well written and very clear on many things and for me it’s the book that encourages me to really explore things with Windows Forms.

So if You believe You’re part of the main target audience then this book should be considered as a ‘must’.

Object-Oriented Programmning (OOP)

During all the years I’ve been around it has always been ’hype’ around OOP and to the fact that classic VB/VBA don’t support Inheritance and Polymorphism. Despite the lack of it I can only conclude that many solutions created with classic VB/VBA works excellent and continue will do it.  The point here is that You don’t need to feel that it’s a must to learn everything about OOP in order to create workable solutions with VB.NET.

If You really want to learn OOP then I strongly suggest that You check out the following two books on the subject:

Visual Basic.NET Class Design Handbook (Coding effective Classes)
Authors: Damon Allison, Andy Olsen and James Speer
Publisher: Apress
Pages: 352
ISBN: 1-59059-275-1 
Target audience: Intermediate – Advanced

In my opinion this is The Book on the subject. They manage to ‘isolate’ the book to only deal with OOP which I highly appreciate, i e one book cover a specific area only. If You’re concerned on the topic then this book is highly recommended.

An Introduction to Object-Oriented Programming with Visual Basic.NET
Author: Dan Clark
Publisher: Apress
Pages: 396
ISBN: 1-59059-015-5
Target audience: Beginner – Intermediate

Clark’s book introduces the readers to the Unified Modeling Language (UML). In my opinion this can be an advantage as it offer a platform to learn OOP in a more structural and in a logic way.

What may be an annoying aspect to consider when it comes to buying book is that MSFT has a extremely high pace of new releases of .NET Framework and VB.NET. However, books can always be useful although they are not ’state of the art’. 

What’s Your opinion about books and do You have any good books to recommend for the .NET – world?

In an upcoming blogpost I will present some books that explicit target Visual Studio Tools for the Office System (VSTO) and Add-ins. 

Kind regards,
Dennis

Blog at WordPress.com.