BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
xxformat_com
Barite | Level 11

Hi,

 

I was wondering why

- hash are converted to  a dot and

- dot are causing an issue

when used in a variable label exported in an Excel file

using the excel engine or dmbs=excel.

 

It works fine with dmbs=xlsx.

 

Is it just a reported bug?

 

libname demo excel "&demo./reporting/test.xlsx";

data demo.test (dblabel=yes);
label  x01 = '1 #test'
x2 = '2. test';
retain x01 1 x02 2 ;
run;

libname demo;


1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

It seems to be a problem related to the Excel library engine (which uses MS software and is only available on Windows).

This code transferred the characters correctly:

ods excel file="/folders/myfolders/test.xlsx";

data test;
label
  x01 = '1 #test'
  x02 = '2. test'
;
retain x01 1 x02 2 ;
run;

proc print data=test label;
run;

ods excel close;

 

View solution in original post

5 REPLIES 5
Ksharp
Super User
libname demo XLSX "&demo./reporting/test.xlsx";
Ksharp
Super User
EXCEL and XLS is very old engine ,it is designed for excel2003 ( test.xls ).
Kurt_Bremser
Super User

It seems to be a problem related to the Excel library engine (which uses MS software and is only available on Windows).

This code transferred the characters correctly:

ods excel file="/folders/myfolders/test.xlsx";

data test;
label
  x01 = '1 #test'
  x02 = '2. test'
;
retain x01 1 x02 2 ;
run;

proc print data=test label;
run;

ods excel close;

 

xxformat_com
Barite | Level 11
So you agree like me that it is a bug in excel dbms. Thanks.

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