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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1187 views
  • 0 likes
  • 3 in conversation