I don't deal with excel much, but the error message itself is pretty simple, and is explained rather clearly in perldiag...
You tried to reference a substr() that pointed outside of a string. That is, the absolute value of the offset was larger than the length of the string.
So basically you get this message as a warning if you try to do something like:
my $string = "foobar";
my $letter = substr( $string, 42, 1 );
It's also a fatal error if you try and do that while using substr as an lvalue (as in my $x = substr( $string, 42, 1 );).