BookmarkSubscribeRSS Feed
Alankar
Fluorite | Level 6

I am using proce export to export the SAS data to excel file. but i need to have two headers(top one is lable with spaces). is there any simple solution? my data has preceeesing zero numbers as customer ID.

basically i want to have the same format of dates, numbers, characters and numbers with preceeding zeros. but with extra header.

CUSTOMER NUMBER

CUSTNBR

00001213

00001212

00121544

Thanks,

Alankar

3 REPLIES 3
Tushar
Obsidian | Level 7

Hi Alankar,

Could you please provide some sample of your current data and the expected output data?

regards,

Tushar J.


Cynthia_sas
SAS Super FREQ

Hi,
Is the above your final report? Just CUSTOMER_NUMBER???? PROC REPORT will do this very easily (give you two headers), but PROC EXPORT will not. Also, there is a possibility that Excel will ignore the SAS formats when it opens your exported workbook. That's because Excel has its own defaults for column formats, widths, etc and PROC EXPORT does not have many ways to influence how Excel opens the file.

On the other hand, if you use ODS, you can influence how Excel treats your data because you can send Microsoft-specific formats to Excel, as described in this paper: http://support.sas.com/resources/papers/proceedings11/266-2011.pdf  (leading zeroes treatment is one of the examples).

cynthia

Alankar
Fluorite | Level 6

Sorry for insufficient explanation.

I need to export 3 sheets, each with 20 variables. I have dates, char variables, numbers and preceding zero variables, like ID and account numbers.

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
  • 3 replies
  • 1208 views
  • 0 likes
  • 3 in conversation