A slightly different approach with fewer (and completely different) dependencies would be to use awk with a script like;
#!/usr/bin/awk -f
BEGIN {FS = "|"}
{
dirname = toupper(substr($1,1,1))
printf("mkdir %s\n", dirname) | "sh"
printf("cp '%s' '%s/%s.xls'\n", ARGV[2], dirname, $1) | "sh"...