Keep leading zeros in Excel when exporting PDF tables
On an invoice, 000472 can be a six-character customer code. If Excel turns it into 472, the amount of a sale may still be correct while a lookup against the customer list fails.
Check the cell in an XLSX workbook
Export the table to XLSX and select the code in Excel. Compare the formula bar with the PDF. PDF Tables to Excel writes 000472 as text. Amounts such as 47.25 can still be numeric in a different column.
Set the column type when importing CSV
A CSV contains characters but no Excel cell types. In Excel, choose Data → From Text/CSV, select the file and choose Transform Data. Remove the automatic Changed Type step if it has converted the code column. Set that column to Text before loading; leave the amount column numeric.
Recover the original value
If the only visible value is 472, a six-digit display format can show 000472 even though the stored number is still 472. Go back to the PDF or the unmodified CSV to recover the actual code. For a 16-digit reference, import it as text from the start: Excel numbers have only 15 significant digits.
Microsoft Support · Excel