This algorithm converts column numbers (1-x) to Excel column names.

Source