Friday, February 23, 2007

Command Line Spreadsheets

Here is a little trick I have known about since the days when MS-DOS was king. I figured, why not share this. Yes, it is geeky, and rarely needed, but what the heck?

If you ever need to put together a quick and dirty spreadsheet, but don't have any spreadsheet software on your computer, you can still create the file you need. While you can do this very easily in any text editor, such as Notepad, let's get real dirty and pretend you dont have a text editor either. Like Carl Maulden used to say in the old American Express commercials, "What will you do? What WILL you do?"


Here is what you do. In Windows, go to Start > Run and type in cmd in Windows NT, XP, or Vista. In DOS-based Windows, like Win95, 98, or ME, type in command. This will pop up a DOS or DOS-like command line with a C:\> prompt.

The first step is to type copy con filename.csv. Filename can be any valid file name. I used test2.csv for mine. Then hit Enter.

Next, type each row of your spreadsheet, one line at a time, dividing the columns with commas. End each row by hitting the Enter key. You can even use Excel forumulae by simply keeping track of which row and column correspond to the A1-style layout of Excel. My example here shows such formulae.

After you have typed the last row, hold down CTRL and while doing that, type the letter Z (Zee to us contrary Americans, Zed to the rest of the English-speaking world). This will put the end of file character on the last line (^Z), and return you to the C:\> prompt. You can now close the DOS environment by typing exit and hitting Enter. Be sure to notice which folder or directory you are in, so you can find your file back in Windows.
Now, you can send your spreadsheet to someone with Excel. They can either go find your file icon, and if CSV files are linked to Excel, just double click it. Otherwise, they just open Excel and select File > Open, and navigate to your file. Like magic, you have a spreadsheet. You can now format cells, create graphs, and do all of those wonderful spreadsheet things we all know and love.


Sore Loserman, Part II

Yesterday, I wrote about how Senator Allard visited this blog. While I am getting the attention of U.S. Senators, let’s talk for a minute about Connecticut’s own Joseph Lieberman. Joe has had a major fall since he was Al Gore’s running mate in 2000. Remember those GOP stickers after the stolen election of 2000 that parodied the Gore Lieberman bumper stickers, that read “Sore Loserman”? Well Joe is proving them right!

Poor Joe. After he failed to win the nomination of his party to run for re-election, he decided to continue to run as an independent. His feelings were obviously hurt by his fellow Democratic colleagues, who endorsed Ned Lamont, the party’s nominee. After Lieberman’s re-election, he made the rounds of the TV talk shows, obviously with bitterness toward his fellow Democrats who didn’t back him against Lamont, but promising to caucus with them anyway.

Now Joe, being the media whore he is, loves to be on TV and the papers. With control of the Senate hanging in the balance, this whiny man is garnering lots of attention. If he doesn’t get his way, he will switch to the GOP, so take that! He’ll take his marbles and go play with somebody else, and you won’t be his best friend anymore! Boo hoo hoo!!!

Joe, I have a suggestion. Do it! Go! You belong with the Republicans anyway. The day you switch is the last day you have any power, and the last day you get any media attention. The Senate will only be in GOP hands in a tie vote, the Democrats will still control the committees, and the House of Representatives will block any stupid bill from getting to the President’s desk. So do us all a favor and switch already! It’s where you belong.

Of course, the honorable thing to do, would be to resign and rerun in a special election as a Republican. Phil Graham, as much as I detest his politics, did the honorable thing when he switched parties years ago back in Texas, and was re-elected. I won’t say re-elected to his seat, because it isn’t his…it belongs to the voters of his state, just like yours does. However, I suspect you would never risk that.

I’m betting this will be Lieberman’s sword hanging over the heads of the Democrats in the Senate. He loves attention way to much to carry out his threat. He also thrives on the power this gives him. Still Joe, please, go ahead and get it over with. And be sure not to let the proverbial door hit your behind as you turn against the party that has been behind you all those years.