BookmarkSubscribeRSS Feed
Richardvan_tHoff
Obsidian | Level 7

I use proc export in SAS EG (9.3 windows server side) to create a xls file.

The strange thing is if I use a sheet name that starts with a number, the first number is replaced with _.

Why is the first number replaced with a _.

DATA work.test;

  a=1;

  b=2;

  c=3;

  output;

  a=3;

  b=2;

  c=1;

RUN;

  PROC EXPORT DATA=work.test

    OUTFILE="test.xls"

    DBMS=XLS

    REPLACE;

    SHEET="123";

  RUN;

2 REPLIES 2
jakarman
Barite | Level 11

There are several naming conventions within this game.

A sheetname can also be a SAS-table name. SAS table-names  must start with a letter or an underscore.
Using that kind of information a table within SAS is a defined structure. That is messing in Excel, but you have range-names.     
SAS/ACCESS(R) 9.3 Interface to PC Files: Reference

14475 - PROC EXPORT to Excel inserts leading underscore in Worksheet name

---->-- ja karman --<-----
data_null__
Jade | Level 19

If you can change to XLSX you can create the 123 sheet name.  You will also have a named-range called _23. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1551 views
  • 0 likes
  • 3 in conversation