Number or digit code?
A four-digit number runs from 1000 to 9999. A four-character code may start with zero, so 0042 is valid when leading zeros are enabled. Results remain strings so those zeros are preserved.
Unique digits within each code
Enable unique digits to prevent repeated characters inside a code, such as 1123. This does not prevent the same code appearing twice in a batch. Four digits are too short for a strong password or long-lived secret.
Will leading zeros survive export?
TXT preserves the characters. Spreadsheet software may interpret CSV cells as numbers; import the column as text to preserve zeros.