Hi,
I have a database column that is defined as
VARCHAR(21) CHARACTER SET LATIN NOT CASESPECIFIC
When I use ODS and create an xls file the field shows up a scientific numbers in Excel. If I change the column format manually to number this solves this issue. The thing is this file is going to be emailed from LINUX without any manual intervention. What can I do to show the field as numeric in Excel as it seems it's translating the character field. When I did a proc contents and proc print on the file it's defined as char(21) and the numbers appear correctly. What do I need to do to make excel recognize this field as either the character that It is defined as or change it to number? I am not able to attach the list file due to security regulations.
define the column as numeric not varchar
when is SAS think as SAS and leave MS behind. ![]()
Hi:
ODS does not create an XLS file. It creates an XLSX (ODS EXCEL) or an XML file (ODS TAGSETS.EXCELXP). With the value turned into a number, Excel may still not treat the number correctly.
Typically, which ever one you use, you may have to send a Microsoft format from SAS to Excel.
Cynthia
Thanks for your reply. I was able to resolve the issue.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.