Documentation of two types of permutation algorithms
...You will need to enable macros to run the algorithms. You can view the VBA code of each algorithm from the developer module house inside Microsoft Excel.
The lexigraphical algorithm is faster because it supports multi-threading.