Excel Deletes Leading 0s When Opening a CSV File

July 1st, 2010 Alex Posted in excel, perl, programming, windows Comments Off

If you want Excel to keep a field’s leading zeros when opening a CSV file using Excel, you can change it to =”value”.

For example, if you have a row with 4 values that looks like this:

test,00016102,test,test

Just change it to:

test,="00016102",test,test
AddThis Social Bookmark Button

Download Excel Spreadsheet from Microsoft using Firefox in Linux

February 8th, 2010 Alex Posted in linux, windows Comments Off

To avoid getting the error “Your operating system does not meet system requirements”, I had to use User Agent Switcher to download the spreadsheet at http://office.microsoft.com/en-us/templates/TC300022771033.aspx for electric meter logging for energy efficiency. Then I used cabextract to extract the .cab file and used Open Office to view the 30002277.xltx file. Here it is saved using Open Office’s ODS format: electricity_tracking.

AddThis Social Bookmark Button

Apache error: Access Informix Database throught ODBC using Perl (Windows)

July 20th, 2009 Alex Posted in linux, programming, windows Comments Off

I was getting this error:

[Mon Jul 20 12:32:05 2009] [error] [client 192.168.241.233] Premature end of script headers: elite_inventory.pl
[Mon Jul 20 12:32:05 2009] [error] [client 192.168.241.233] DBI connect('my_database','my_user',...) failed: [INTERSOLV][ODBC Informix driver][Informix]Unable to load locale categories. (SQL-HY000) at C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/script.pl line 37

The fix involved modifying Apache’s environment variables using SetEnv in httpd.conf:


SetEnv INFORMIXDIR "C:/informix32"
SetEnv INFORMIXSERVER "isaac_net"
SetEnv DELIMIDENT n
SetEnv DBANSIWARN n
SetEnv CLIENT_LOCAL "en_US.CP1252"
SetEnv DB_LOCAL "en_US.CP1252"

This is because even if the variables are set in the registries in Windows (they are environment variables in Linux), the web server doesn’t use them.

Reference #1 and Reference #2.

You might need to use a different locale under Linux or Unix.

AddThis Social Bookmark Button

Excel Keyboard Shortcut – Selecting The Whole Data Region

February 18th, 2009 Alex Posted in productivity, windows Comments Off

If you need to select the whole data region (it might included some empty cells) in Excel without selecting all cells (<CTRL>+<A>), click on any cell inside that group and then type: <CTRL>+<SHIFT>+<8>. It is very useful for large data sets.

You should then get something like this:

excel spreadsheet screenshot

Try http://www.rnib.org.uk/xpedio/groups/public/documents/publicwebsite/public_rnib003503.hcsp for more keyboard shortcuts.

AddThis Social Bookmark Button

Really cheap and well rated GPS USB adaptors for laptop/netbook

December 6th, 2008 Alex Posted in electronics, hardware, linux, windows Comments Off

GLOBALSAT BU353 Waterproof USB GPS Receiver

  • GARMIN 010-00321-00 GPS 18 Deluxe USB Sensor
  • The Globalsat BU-353 would be my first choice, it has very good reviews and it is waterproof.

    AddThis Social Bookmark Button