BookmarkSubscribeRSS Feed
SAS-Nutzer
Fluorite | Level 6

Hi,

 

we have a routine that is creating a .xls file which is actually an XML file (via ods Tagsets.ExcelXP). Now I know there are ways in SAS to convert an XML-file to a xlsx-file on Windows, which is described here and here . However, those require SAS on Windows since they use a Visual Basic script. Our SAS runs on Linux. Is there any way to do a similar behaviour on SAS-Linux?

6 REPLIES 6
ballardw
Super User

@Kurt_Bremser wrote:

Why carry the church around the cross?

Create the file with ODS EXCEL in the first place.


Too obvious.

 

May be an appropriate place to remind @SAS-Nutzer that you can send results to multiple ODS destinations at the same time with something like:

 

Ods tagsets.excelxp file="<path>\filename.xml";
Ods excel file="<path>\filename.xlsx";
ods rtf file="<path>\filename.rtf";

<something that generates output>

ods rtf close;
ods excel close;
ods tagsets.excelxp close.

BTW bad things happen to people that lie to the operating system. The Excelxp creates xml. naming the output with XLS extension does not change the file type and can cause problems related to "type does not match extension" which can be a serious issue as Microsoft office file formats get further away from the getting very old XLS extension binary format.

ChrisNZ
Tourmaline | Level 20

Ah!  A German idiom! 👍

Quite self-explanatory, but I looked it up just in case

    carry the church around the cross - be awkward, make an unnecessary detour.

according to the web

Kurt_Bremser
Super User

@ChrisNZ wrote:

Ah!  A German idiom! 👍

Quite self-explanatory, but I looked it up just in case

    carry the church around the cross - be awkward, make an unnecessary detour.

according to the web


The Catholic church in Austria has several feasts where a procession through the village is done. As churches are usually situated at the village center, the cross is carried "around the church".

At least since the 18th century, people have used this phrase to denote something that is done unnecessarily complicated. And I found that a direct translation still gets the meaning across 😉

ChrisNZ
Tourmaline | Level 20

@Kurt_Bremser @ballardw 

Maybe @SAS-Nutzer does not know about the excel ODS destination. These have come thick and disorganised, so keeping track is not necessarily easy.

Ksharp
Super User
Can you use the following :

filename t temp;
libname x xmlv2 'c:\temp\temp.xml' xmlmap=t automap=replace;
proc copy in=x out=work noclone;
run;

to read in sas . and export excel file via sas as well ?

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
  • 6 replies
  • 1967 views
  • 4 likes
  • 5 in conversation