Excel: Blattschutz für alle Tabellenblätter aufheben

Mein Kollege hatte heute das Problem, dass alle Tabellenblätter einer (sehr großen) Excel-Datei aus Versehen geschützt wurden. Mit diesem Makro konnte ich den Blattschutz in der gesamten Datei aber recht schnell wieder aufheben:

Sub BlattschutzFuerAlleTabellenblaetterAufheben() Dim i As Integer For i = 1 To Sheets.Count Sheets(i).Unprotect Password:="geheim" Next i End Sub

Softwareentwickler-Stammtisch in Vechta am 04.03.2015

Der nächste Softwareentwickler-Stammtisch in Vechta steht an: am 04.03.2015 um 18 Uhr im Markt 4.

Wer sich per Xing anmelden möchte, kann das hier tun: Softwareentwickler-Stammtisch in Vechta.

Die Mitgliedschaft bei Xing ist Nebensache. Wir laden wie immer herzlich alle interessierten Softwareentwickler und Softwareentwicklerinnen aus der Region Vechta/Cloppenburg/Diepholz zum Erfahrungsaustausch ein.

How to change the Permalink structure in WordPress without invalidating old links

If you want to change the Permalink structure of your WordPress site under Settings -> Permalinks, e.g. from Day and name to only Post name, you should prevent the old links from resulting in a 404 page and instead redirect them to the new URLs. If you don’t preserve the old links, search results e.g. from Google may link to not existing pages and your visitors will almost always leave your site instantly.

Change the Permalink structure in WordPress

The solution to this problem is the WordPress plugin Safe Redirect Manager, in which you can configure 301 redirects with Regular Expressions. Simply install the plugin and configure a redirect from /[0-9]+/[0-9]+/[0-9]+/(.*)/ to /$1/ under Tools -> Safe Redirect Manager.

Edit Redirect Rules with Safe Redirect Manager

This will redirect a post like /2015/01/21/my-blog-entry/ to /my-blog-entry/ Over time, search engines will update their links to the new URLs. Until then, your WordPress site will be reachable via the old links.

How to quickly create Setext headers when writing Markdown with Vim

When writing Markdown, you can define headers using the Setext style like so:

This is a header

If you use Vim for writing your text, you can quickly turn a line into a header with this short key combination:


What it does (bold text indicates the current cursor position/selection):

  1. yy yanks (copies) the current line:
    I want to be a header
  2. p pastes the yanked line below the current one and places the cursor on the first character of the pasted line
    I want to be a header
    I want to be a header
  3. V visually selects the current line (the pasted one)
    I want to be a header
    I want to be a header
  4. r= replaces every character in the current selection with the character =
    I want to be a header

Easy, right? Another reason to love Vim! 🙂

Incremental search and replace in Vim

Because I rarely need it and forget it almost instantly, here’s how to incrementally search and replace text in Vim:


For each occurrence of old you’ll get asked whether to replace it with new and you can individually accept (y) or reject (n) the replacement.

How to ignore a complete Java package in Checkstyle

One of my Java projects contains generated code which produces quite a few Checkstyle warnings. To ignore all files in this package, I needed to configure Checkstyle’s module SuppressionFilter as described in Checkstyle’s documentation:

File checkstyle.xml (Checkstyle config):

<module name="SuppressionFilter">
    <property name="file" value="suppressions.xml"/>

File suppressions.xml:

<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
    <suppress checks="." files="[\\/]PACKAGENAME[\\/].*\.java$"/>

This ignores all files whose path contains /PACKAGENAME/.