BookmarkSubscribeRSS Feed
Grandhi4
Calcite | Level 5

     Hi All,

               I have one data set how to convert a XML out put (XML Format file) ....with ODS

Thanks,

Suresh

3 REPLIES 3
Haikuo
Onyx | Level 15

To learn the whole nine yard, google: sas ods excelxp tagset

To get a taste of it, try the following code, modify the folder name to match your own system:

ods _all_ close;

ODS Tagsets.ExcelXP file='c:\temp\class.xml'

                    style=statistical;

proc print data=sashelp.class;

run;

ods tagsets.excelxp close;

ods listing;

Haikuo

Cynthia_sas
SAS Super FREQ

Hi:

  There are more types of XML than that created by TAGSETS.EXCELXP. ODS can create some predefined XML formats, like SASReport XML (which is used by the BI Platform and EG) and it can create Spreadsheet Markup Language XML (such as used by Excel 2003 and higher). SAS can also create CDISC XML, XBRL, Oracle XML and other types of XML, like Justice ML, Music ML or Chem ML.

  XML is Extensible Markup Language -- Microsoft doesn't have the -ONLY- type of XML that is possible to generate.

  But, IF the OP wants output for Excel, then ODS can create ASCII text files that Excel knows how to open and render:

1) Comma separated text files: using ODS CSV or ODS CSVALL

2) HTML text files: using ODS HTML, ODS HTML3 or ODS MSOFFICE2K

3) XML text file: using ODS TAGSETS.EXCELXP

All the output that you create with ODS is ASCII text format. How the resulting file is opened depends on what application you use. For example if you create an HTML file with ODS, you can always go to Excel and do a File --> Open to open the HTML file directly with Excel. Or you can name the file with a .XLS extension to fool the Windows registry into launching Excel when you double click on the file.

The OP posted in another forum that he had the BI Platform. The only issue with TAGSETS.EXCELXP and the platform is that

1) sometimes, depending on your version of EG, EG does not like to open TAGSETS.EXCELXP output -- so you have to go outside of EG to open the file

2) if you make a stored process using TAGSETS.EXCELXP, you cannot run that stored process in all the client applications on the Platform -- you have to execute that stored process using either the Information Delivery Portal or the Stored Process Web App.

More info on the topic of XML,

cynthia

Cynthia_sas
SAS Super FREQ


Hi:

  Just curious...in this posting https://communities.sas.com/thread/37274 you said you wanted Chem ML form of XML. Has that requirement changed?

cynthia

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