Feb 25, 2010

Quick Excel table join

Situation: two excel worksheets with a common id column to join on.

Use LOOKUP and VLOOKUP to do this in a simpler manner. BUSCAR y BUSCARV en castellano.

1. Copy your id column to a new worksheet
2. For each column of interest paste the formula =INDEX(SourceSheet!$A$1:$T$500;MATCH($A$3;SourceSheet!$S$1:$S$500;0);SourceColumnOfInterestNumber)

Function parameters:
INDEX(dataRange;rowNumber; columnNumber)
MATCH(targetValue;dataRange;matchType(0 for exact match))

In Spanish language version Excel:
INDICE = INDEX
COINCIDIR = MATCH

Feb 22, 2010

Sharepoint: Access denied while uploading multiple files

Problem: you receive an error message saying "Access denied" while uploading multiple files or images to a sharepoint library, even though you have all the necessary permissions.

Solution: your filename contains characters that aren't allowed by Sharepoint.


Microsoft lays it out for you here: http://support.microsoft.com/default.aspx?scid=kb;en-us;905231

Feb 10, 2010

Blank items in DropDownList controls

After playing with JQuery to dynamically insert a blank option in my DropDownList but not finding a way to maintain the logic through a postback, I came across this wonderful post from Tomas Ekeli:

http://personalinertia.blogspot.com/2007/08/dropdownlist-with-blank-item-on-top.html

Works perfectly! Thrown in a RequiredFieldValidator with an InitialValue property and you're set.

Feb 3, 2010

How to export a key with Microsoft Enterprise Library

If you ever need to move an encryption key for Enterprise Library from one server to another, here's how to do it. No, you can't just copy the key file.

ON THE ORIGINAL SERVER

1. Open the Enterprise Library Configuration tool from the Start menu > Microsoft Patterns and Practices > Enterprise Library 4.0


2. Open your application configuration from File > Open Application and find your exe.config file that contains your Enterprise Library configuration.



3. Select your Symmetric Provider entry and choose Export Key from the Action menu.


4. Choose a location to save your exported key file and a password to protect it.



ON THE NEW SERVER


5. Copy the exe.config file and the export key file to your new server.
6. Run the Enterprise Configuration tool and open the exe.config file
7. Create a new Symmetric Algorithm Provider in the Symmetric Provider section


8. Choose the same encryption algorithm used on the original server


9. Choose the option to "Import a password protected key file"


10. Locate your exported key file and enter the password you protected it with


11. Choose a location to save your new permanent encryption key


12. Choose machine mode if you want all accounts to be able to use this key.


13. Rename or delete the old Symmetric Provider



14. Rename the new Symmetric Provider with the name of the old Symmetric Provider


15. Save your new Enterprise Library configuration.