Building a large text file editor – Part II

In the previous post I created a class that was going to be used as an interface between a large file editor and the file on the disk. Since then I’ve been implementing the user interface and, obviously, the RevisionStream also needed some readjustment. Here are some major changes that were done: – detecting encoding…

1

Building a large text file editor – Part I

The purpose of this series of two blog posts is to illustrate how an editor for large files can be implemented. The first part will address the model behind the editor whereas the second part will include an actual UserControl that allows users to view and edit large files. The basic idea behind a large…

3

Back to school – Office art geometry

Let’s start off with the following observation- the following two shapes have the same Left and Top coordinates:   What’s different is obviously the rotation. What Office saves for a shape is the Left and Top coordinates together with a Rotation. So the Top coordinate, for instance, is not necessarily the uppermost part of a shape….

0

Using DDE in C# for Office automation

  Looking for some code samples how to pass DDE messages from a .NET program I found out that there‘s a great library already in place that facilitates working with DDE: the NDde project from Codeplex: http://ndde.codeplex.com/ However, I just needed to make one call and including a new DLL into my code would have…

0

Using .NET library in VBA

Three easy steps for exporting .NET functionality to VBA: 1. Write a source file:   using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.Windows.Forms; namespace InteropTest { [Guid(“BEB2C62D-5646-4B08-81DF-670314BFEE4A”)] public class InteropTestClass { public void Help() { MessageBox.Show(“Hello From .NET!”); } } } The GUID needs to be unique. 2. Generate a strong…

1

Complex editing of XLSX files

  Editing Excel OpenXML documents using the OpenXML 2.0 SDK offers better performace and improved supportability compared to normal Office automation (e.g. VBA). There are also great examples on the Internet to get started: Office Open XML Formats: Inserting Values into Excel 2007 Cells. What I haven’t found until now is some clarifications as to…

0

Brushing up on the WPF and Windows 7 Jump Lists

  This is just a summary on the new Windows 7 features and how these can be implemented in .NET. There is plenty documentation on both Windows Presentation Foundation and the Windows 7 SDK but actually implementing a solution is a bit harder. So here we have it: a WPF application that create Jump Lists…

0

XML Highlight in RichTextBox

  Recently I’ve been looking for some piece of code that would perform XML highlighting in a Rich Text Box. The Internet provides several free samples and several commercial samples but I wasn’t really satisfied with what I found, mainly because it involved using an XMLTextReader object, which does not help for WYSWYG editing of…

16

OpenDoc tool unveiled

After the previous blog posts with the OpenDoc tool, I’ve learned that, while this tool can be very helpful, it also raises a lot of questions mainly because it lacks proper documentation. As such, I’ve decided to post the source code giving everybody who is interested the liberty of modifying it to suit their needs….

0

Working with OpenXML documents

The default format for saving Excel, Word and PowerPoint documents has luckily changed since Office 2007 to the Open XML formats. There is good documentation available for these formats on: MSDN: Introduction to the Office 2007 file formats: http://msdn.microsoft.com/en-us/library/aa338205.aspx   MSDN – sample code: Editing Excel cell values from .NET code: http://msdn.microsoft.com/en-us/library/bb332058.aspx   ECMA: ECMA…

0