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

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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