Believe me, you're preaching to the choir. I waste an inordinate amount of time trying to get SAS and Excel to work together. But I'm basically in the middle of the flowchart -- the data files are produced upstream by someone else (who technically doesn't even work on this project but has access to the data warehouse where the info comes from). I process the files, pulling out the records we're interested in, and then pass them along to the principal investigator. To review, she needs to be able to easily display and sort, add comments and additional variables, etc. Excel does that and it's something that we already have on our computers.
The upstream person also created the encrypted_ID variable. I don't know why it has a length of 200. It displays with a length of 64 characters with no extra spaces. Here is an example: 20850C1CF365857E237F9D83A9F5DCCD7525F99AB62987BB025C2430ED8B1E90
I also discovered that Excel inserts a line break for some reason. So that same ID in Excel is displayed as
20850C1CF365857E237F9D83A9F5DCCD7525F99
AB62987BB025C2430ED8B1E90
even though the entire number is contained in the same cell. But I suspect the line break may explain the extra 2 characters that give it a length of 66 instead of 64.
When I figured this out, it gave me an idea. I simply created truncated versions of the IDs with a length of 40, and then used those to match. I had to manually compare the full IDs to make sure there weren't 2 separate IDs that truncated to the same ID (there weren't). It's ugly, but it worked.
... View more