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 2025: Call for Content

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!

Submit your idea!

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