I'd convert the possible String codes to consecutive numbers according to something like a mixed base-10 and base-26 system, multiplying the character's value by a position-dependent factor:
- char 0 by
10*26*10*26*10
- char 1 by
26*10*26*10
- char 2 by
10*26*10
- char 3 by
26*10
- char 4 by
10
- char 5 by
1
Typically, I'd represent A..Z as 0..25, only (to avoid the gap at the missing W and Z character in the first place) I'd adjust the mapping at that position.
Then, I'd produce all numbers in between the two converted limits, and convert them back with the reverse scheme.
Be aware that in the worst case A0A0A0..Y9Z9Z9 you'll get 16 million strings.