Three files are attached:
When reading the two csv files into the Mathcad file, the first element of the DATA file is corrupted and looks like
However, the DATE.csv file reads in correctly as:
What is causing the corrupted first element when reading in the DATA.csv file.
Thanks for any help provided.
Solved! Go to Solution.
Your problem occurs because there is actually some data in front of the first date, in the DATA file.
I read the first 16 bytes of each file to show:
Note that 49 is the ASCII character "1", that's where the date starts.
Whatever you used to generate those .CSV files, has put those extra bytes with values 239, 187 and 191 in front of the first date.
I really appreciate your help; however, I do not understand. Recall my post of my COVID-19 research on 10-21-2021. These are csv files that I downloaded from the CDC. Right after 10-21-2021, I had to have two emergency surgeries. I am just now recovering to the point that I am resurrecting that research. Before the surgeries, all worked fine, now it doesn’t. I have not changed anything other than downloading the updated CDC files. Can you give a little more information on how you viewed the ASCII codes in the files? I don’t understand how the spurious entrees are getting in the file. Perhaps the CDC changed something. If they are there, why don’t I see them in the raw downloaded csv file. For now, until I understand what’s going on, I will have to use Terry’s solution.
PS: Forget my first reply.
I downloaded the two .CSV files that you attached at the start of this thread. Opened them with Notepad, to see nothing wrong apparently.
Then I started Mathcad and used READBIN() to take the first 16 bytes out of each of the two files and display the data values.
The extra bytes at the start are in that one .CSV file, as shown in my previous reaction. I opened the same file using Excel, and it also starts with the date, showing no signs of extra characters. Apparently these characters don't show normally.
I guess, if you want to 'repair' the DATA file using Notepad, you'll have to copy the entire data set (the 'text' in Notepad), and paste it to a new (Notepad) file, which you can save under the same (overwrite), or a new file name.
I used an old program called "Programmer's File Editor" .
Program shows up spurious characters in files.so you can delete them.
Program is freeware and has proved useful to me a number of times.