Retrieving Information From Excel 2007 Files

Ever needed a sample code to programmatically extract data from Excel 2007 table?   Given an excel table like this (in book1.xlsx):   Name ID Color Ball 1 White Phone 2 Green Cup 3 Yellow     Here’s a function to retrieve the contents of the table:   /// <summary> /// Retrieves an excel table…

4

RichTextBox Tips

Although this blog is about XAML only I decided to take on the next step and write some code behind. 1. How to get selection range excluding the UIElements and such from RichTextBox:             StartIndex = new TextRange(richTextBox.Document.ContentStart, richTextBox.Selection.Start).Text.Length;            Count = new TextRange(richTextBox.Document.ContentStart, richTextBox.Selection.End).Text.Length – StartIndex; 2. How to change font weight, change to italic, etc…

1

Blobbying #1 – Introducing Blob the Builder

Do you remember long time ago when you (or someone else) used to play with small and cute snails, dirt, and sticky, slimy things? The blobs are here again! Remember your most precious childhood memories (where applicable) with this short blobbyfying experience.   Above is what we are going to do. I tried to pick…

64

XAML Load support in Cider May CTP Release. Sample app.

You would be glad to know that some of the improvements in May CTP include: –         Support for x:Static –         Traversing properties, for example: TargetProperty=”(Control.Background).(LinearGradientBrush.GradientStops)[1].(Offset)” –         Improved resolution of Control Templates, Bindings, Resources and Styles –         Improved error reporting for XAML files that contain errors –         Basic usage of Storyboard   Parts of the above…

4