BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Stalk
Pyrite | Level 9

I am using Proc export to write to three sheets in an single workbook.

In the first sheet( cell A1)  I just have to write text "Product ver: 3.1" with out any titles or columns so the SQL data base can read my excel books with all the 3 pages. Is there a simple way to do this?

When I export all the three sheet are populating with data except the first sheet where it is writing as follows.. How can I avoid the column name  "txt" and only product version.

txt
Product Ver: 3.1

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Show what code you used to "export" to an excel file.

PROC EXPORT should be able to do that.

data have;
  txt='Product Ver: 3.1';
run;
proc export data=have file='c:\downloads\no_header.xlsx' replace dbms=xlsx;
  putnames=NO;
run;

Tom_0-1657638799528.png

 

View solution in original post

4 REPLIES 4
Tom
Super User Tom
Super User

Show what code you used to "export" to an excel file.

PROC EXPORT should be able to do that.

data have;
  txt='Product Ver: 3.1';
run;
proc export data=have file='c:\downloads\no_header.xlsx' replace dbms=xlsx;
  putnames=NO;
run;

Tom_0-1657638799528.png

 

Stalk
Pyrite | Level 9

Perfect. SAS community is the Best friend for those working as solo SAS performer in the team.

I love this community

Stalk
Pyrite | Level 9
Actually, what is the equivalent to putnames=NO when using ODS excel?
proc export is truncating some of the character data so decided to use ods excel.

ODS excel options(sheet_name='Version' );

Proc print data=ver noobs;
run;
Stalk
Pyrite | Level 9
Worked..
Proc report data=ver noheaders;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

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
  • 4 replies
  • 553 views
  • 0 likes
  • 2 in conversation