26 May 2010
Excel VSTO Add-In Series
I finally got to reviewing and scrubbing the code for the part 2 of my Excel 2007 VSTO tutorial; you can download the code here. Next chapter, we will venture into the joys of deployment.
In the meanwhile, please feel free to let me know in the comments what you think, like and dislike, and how I can make this better!
More...
20 May 2010

I gave a quick Firestarter talk at the San Francisco .Net user group yesterday about .less. .less (“dot-less”) is an open source .Net library, which extends the functionality of CSS (it works with your existing CSS files), adding features like variables, using a syntax close to CSS. If you find that working with CSS causes some teeth-grinding , you should probably have a look!
Download the slide deck here
More...
16 May 2010
I have been working with trees quite a bit lately, because I am coding something which involves probability trees: based on the state of the system, there is a number of things which can happen, each with a certain probability.
I ended up writing a simple generic Node class, which can contain anything, and can have multiple children, along these lines:
public class Node<T>
{
public Node()
{
this.Children = new List<Node<T>>();
}
public T Content
{
get;
set;
}
public List<Node<T>> Children
{
get;
private set;
}
public bool IsLeaf
{
get
{
return (this.Children.Count() == 0);
}
}
}
Pretty quickly, I realized I would need to get the list of all nodes under a certain node, as well as the list of its leaves (a leaf being a node that has no children, i.e. an endpoint of the tree). This is a job tailor-made for recursion: if a node is a leaf, return it, otherwise, search further in all his children.
More...
06 May 2010
Excel VSTO Add-In Series
Today’s post will be much lighter than the previous episode: we will display detailed information about the differences that have been found on the ComparisonView control. To do this, we will bind properties of the Difference to the control, and use a WPF Value Converter to dynamically format the control.
Displaying how the cells differ
The add-in tracks cells where either the values or the formulas are different. We will simply display “side-by-side” the values and formulas of the cell that is being compared in the ComparisonView control:

To do this we need to provide a way to access the value and formula of each side of the comparison, so first we add the following properties to the Difference class:
public class Difference
{
public string OriginalValue
{
get; set;
}
public string OtherValue
{
get; set;
}
public string OriginalFormula
{
get; set;
}
public string OtherFormula
{
get; set;
}
More...
27 Apr 2010
First, my sincere apologies if you have been experiencing some strange behavior when trying to comment on this blog in the past few days – like maybe an unfriendly pop-up message talking some nonsense about a callback error while processing the comment.
You may have noticed that below the form for the comment, there is now a beautiful, brand new and shiny ReCaptcha control, which is included out of the box with release 1.6.1 of Blogengine.Net. Thanks to Filip Stanek for contributing his ReCaptcha extension to the project, and to the awesome development team for including this out-of-the-box. Until now, spam handling has been a major weakness of BlogEngine.Net, and was turning into a serious annoyance for me. Since the upgrade, the spammers’ evil plans have run into a wall, and it suddenly feels very lonely in here, without all the kind words of encouragement:
Intimately, the post is in reality the freshest on this valuable topic. I harmonise with your conclusions and will thirstily look forward to your future updates. Just saying thanks will not just be sufficient, for the exceptional clarity in your writing.
Special thanks (Grazie mille!) to Andrea Dottor who came to the rescue with a fix for the error message mentioned above.
More...