I want to export the sas data to csv, but I met some issue for partial date with ---. when I open csv with excel, the #NAME? error will show. How to show the format left to CSV file?
Welcome to the SAS communities!
Please post your dataset and the code you used to export the dataset, so we can recreate your issue.
Post your dataset as a self-contained data step with datalines, so we do not need to make guesses about variable types and other attributes.
Post your code using the "little running man" button (8th icon right above the main posting window).
And what happens if you open the csv-file with a text editor like notepad++? Excel does strange things when reading files.
And to examine the CSV as such with a text editor you cannot SAVE the file from Excel. That will change the values of cells.
If I want to fix the error, I try to add a TAP before the partial date, and the date ---2020 will show as ---2020 in excel, but it is different with other complete date, the complete date 01-JAN-2020 will show as 01-JAN-20.
Show us the data and the export code; only then will we be able to recreate your issue.
It is normal when I open it with notepad++, so its the excel issue, we can't see a partial data as ---20 in excel if the date=---2020?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.