BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

Right now in my company we are using SAS 8.2 and the Base SAS, SAS/Connect to do the processing. We connect to the server using SAS/Connect and then use the Proc download to get the data and then disconnect from the server and then do the processing and then use DDE links to write data in to excel with formatting and then they are uploading it to the server using proc upload.

Right now we have SAS 9.1.3 and SAS Enterprise Guide also. Is there any other way to write to excel with formatting other than DDE that we can do using SAS EG.

Please guide.
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
If you want nice formatting (colors and fonts), you can use either:
1) HTML-based methods: ODS HTML, ODS HTML3, ODS MSOFFICE2K all of which create HTML files that Excel can open. However, with HTML-based methods, you are limited to your output being put in one worksheet in one workbook, because Excel treates 1 HTML file as 1 Worksheet.

2) XML-based methods: Starting in Office 2002/2003, Microsoft announced the specification for Spreadsheet Markup Language XML. SAS and ODS can create that type of XML file with the ODS TAGSETS.EXCELXP destination. One advantage of this method is that you can create multiple worksheets in one workbook using TAGSETS.EXCELXP.

There have been lots of forum postings about using both of these methods. If you search though the forums or the support.sas.com web site, you can find lots of examples. Here's a place to start:
http://support.sas.com/rnd/base/ods/templateFAQ/Excel1.pdf

This PDF file discusses the 2 basic methods outlined above and some advanced methods, too (such as using SAS/IntrNet, etc).


cynthia
deleted_user
Not applicable
Hi,

Thanks for the support.

I have to use Excel 2007 and can not use HTML. Need to create direct excel itself.
any suggestion for this? and how i can do this using SAS enterprise Guide.

Thanks again.
Cynthia_sas
SAS Super FREQ
Hi:
From within EG, you can EXPORT your data or report to Excel, however, I believe there is no formatting with this option.

Spreadsheet Markup Language XML -IS- a Microsoft standard. It is the description of how a multi-sheet workbook should be rendered in Excel with colors and fonts and other formatting (like $ ) applied. Even though Spreadsheet Markup Language was an Office 2003 definition, Office 2007 will open and render the files correctly if they have Spreadsheet Markup Language tags. ODS TAGSETS.EXCELXP creates Spreadsheet Markup Language XML that conforms to this Microsoft specification.

This Microsoft site discusses the advantages/disadvantages of HTML versus XML:
http://msdn.microsoft.com/en-us/library/aa140062(office.10).aspx

The new Office 2007 .XLSX files are a new form of XML in which the pieces of the Workbook are stored in a zip package/XML format. The Office 2003 XML is not stored in this format. However it is still a valid Excel format and under File --> Save AS, the file type is: XML Spreadsheet 2003 (*.xml) also, under File --> Open, you can open an XML file that conforms to the XML Spreadsheet 2003 specification - -such as files created by ODS TAGSETS.EXCELXP.

XML is -not- HTML. Even Microsoft says so. I don't know of any other alternatives except those mentioned -- using the Export or Libname engine functionality creates a binary Excel workbook -- but with no formatting. Using TAGSETS.EXCELXP creates an XML Spreadsheet 2003 workbook -- with formatting.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 3 replies
  • 1135 views
  • 0 likes
  • 2 in conversation