BookmarkSubscribeRSS Feed
bassrick
Calcite | Level 5

Hello,

 

I am currently using the new xlsx engine to generate my spreadsheets.  Works pretty darn good.  However, I have one example where I want sas to generate the column headers using the labels in the sas dataset.  This is running on a Linux box, with 9.4,

NOTE: SAS (r) Proprietary Software 9.4 (TS1M3)

Linux LIN X64 2.6.32-642.13.1.el6.x86_64 #1 SMP Wed Nov 23 16:03:01 EST 2016 x86_64 Red Hat Enterprise Linux Server release 6.8
      (Santiago)

 

Here is my code:

%let myfile = Prod_code_XREF_Bus_Cnsmr_&mmmyyyy..xlsx;
%let mytarget = &folder./&myfile.;

 

libname xl XLSX "&mytarget";

 

data xl.Sheet1;
  set prodhier;
run;

 

libname xl clear;

 

***********

 

Is there an option that can be set to say "use the var labels for column names" as you could with proc export?

2 REPLIES 2
art297
Opal | Level 21

Honestly, I don't know. However, you can use the LABEL option with proc export using the DBMS=XLSX option.

 

see: chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/http://support.sas.com/documentation/cdl/en/acpcref/69731/PDF/default/acpcref.pdf

 

Art, CEO, AnalystFinder.com

Reeza
Super User

 

The usual option is DBLABEL which doesn't appear to work with XLSX engine as far as I can see. 

😞

 

I used to use this with EXCELCS and EXCEL via LIBNAME. 

 

http://support.sas.com/documentation/cdl/en/acreldb/69580/HTML/default/viewer.htm#p1aksmchxr4bekn1bd...

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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