Stop letting PDF imports turn your CAS numbers into hidden dates

When converting scanned PDF documents into Excel, users often encounter frustrating issues, such as chemical CAS numbers being misinterpreted as dates.

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Excel is not a PDF reader, and pretending otherwise is costing you time and data integrity. The user who posted this problem did everything right, scanned a chemical list, exported the PDF, opened it in Excel, and still ended up with CAS numbers silently converted into serialized date values. That's not a user error. That's a tool mismatch.

The core issue is that Excel treats any hyphenated numeric string like 75-01-04 as a date unless you pre-format the column as text. But the user never gets that chance, because the PDF conversion happens before the data ever reaches a spreadsheet. Adobe's export logic sees a number pattern and applies its own formatting, and Excel then inherits that formatting as if it's intentional. The result: a CAS number that *looks* correct on screen but behaves like a hidden integer when copied or filtered. The automation the user relied on, paper copy to Excel, becomes worthless the moment a single value transforms into 63923.

This isn't an isolated frustration. It's a symptom of a broader problem: legacy tools were never designed for the structured, automated workflows we need today. PDFs are presentation formats, not data formats. Excel is a calculation engine, not a data ingestion platform. When you force one to do the other's job, you get silent corruption. No error message, no warning, just a value that looks right until you try to use it.

The practical fix for this user is straightforward, if tedious: import the PDF into a tool that respects the original data structure. Power Query can't read scanned PDFs as structured tables, but dedicated PDF extraction software (like Tabula or Adobe's own export-to-Excel with "Preserve text" enabled) can output a clean text column. Once you have the data as text, you can format the CAS number column as text *before* pasting it into Excel. That prevents the date conversion entirely. If you're stuck with the corrupted file, use Power Query's "From Table" on the imported data, then change the column type to text and replace any numeric value with its original string using a lookup from your source PDF.

The bigger lesson: stop trusting a single export button to preserve your data's meaning. Every conversion point, PDF to text, text to Excel, Excel to table, is a place where information can silently change shape. Build a process that validates each step, not one that assumes the tool got it right. The user's instinct to automate was correct. The mistake was trusting the automation to be invisible. Make it visible. Verify the output before you use it. That's the only way to keep a CAS number from becoming a hidden date.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Like the title says, I have a pdf of a scanned document which is a list of chemicals including CAS numbers ( ex. 75-01-04) that I have converted into excel. When I open the excel file, all the cas numbers *look* right, but when I try to copy or format them some of them turn out to be changed into numbers as excel dates ( ex. 63923).

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community