Sunday, October 14, 2007

Sticky columns or rows in OpenOffice Calc

A very handy feature of OpenOffice Calc that I often use, but never seem to remember is freezing columns or rows. Meaning, when you have a large worksheet and you scroll down or you scroll to the right, some specified columns or rows stay fixed. This is very handy for columns/rows containing headings.

Since I always forget how to do this in OpenOffice Calc, I thought I would write it down here.

Suppose you have an OpenOffice Calc document to keep a list of things to do. It has columns for the task you need to do, the status of this task, the date you last changed the status and any additional remarks.


Select the columns or rows you want to keep on every screen even when scrolling and then select one more.

Now, click Window - Freeze.


That is all. When you scroll down, the top rows will stay visible.


Somehow, I always start looking at print ranges and repeating rows or columns, which does exactly the same, but when printing only.

And, funny, remember to select one row/column more then the rows/columns you want to freeze.

Tip:
If you want both columns and rows to freeze, click on the top left cell you don't want to freeze and click freeze. That way, two lines will show up, one on the left of the cell and one just above the cell and all columns and rows to the left/top of these lines will freeze whenever you scroll.

Read more >>

Wednesday, October 3, 2007

DOS Command for searching text in files on windows

When you want to know which files in a specific directory contain a certain text, it is sometimes easier to search with a DOS command, rather then using the Windows Search functionality. The Windows Search functionality can have trouble finding files with certain extensions, such as .php.

To search quickly from the command prompt for files containing a certain text, I often use the DOS command findstr. It is easy to use and fast.

Let's say you want to find all php files in the directory C:\htdocs\joomla that contain the text "mail". With findstr you can do that as follows:

  • Open a DOS prompt.
  • Use cd to go to the directory C:\htdocs\joomla.
  • Type the following command:
findstr /MSC:"mail" *.php

This will give the names of all php files in C:\htdocs\joomla that contain the text "mail". If you also want to see which lines exactly contain the text, leave out the 'M'. The 'S' makes sure that you also search all subdirectories.

Tip:
Type findstr /? to see a list of all possible options you can use with the findstr command.

Read more >>