LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 20 Jun 2003 09:31:36 -0400
Reply-To:     Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject:      Re: ODS to Excel: formatting text fields
Comments: To: Ben Powell <ben.powell@CLA.CO.UK>
Content-Type: text/plain


AFAIK, the definitive reference on using ODS to create Excel files is Chevell Parker's SUGI 28 paper, available online at He discusses this issue extensively and suggests a number of possible solutions, depending on the underlying file type you want to use, version of Excel, etc.

Good luck!

Mike Rhoads Westat

-----Original Message----- From: Ben Powell [mailto:ben.powell@CLA.CO.UK] Sent: Friday, June 20, 2003 8:42 AM To: SAS-L@LISTSERV.UGA.EDU Subject: ODS to Excel: formatting text fields

I use ODS to export various reports and would like to use it in another way but there is a problem. I'm exporting ISBNs which can contain an X check digit so must be treated as text. However Excel considers them to be numeric when there is no X. I can use DDE and preformat the column as text to resolve this but I can't get ODS to achieve the same thing. If I import the html into excel having preformatted the column that doesn't work, and if I ODS directly to an xls file that doesn't work. The result is the leading zeros are trimmed. As the file can contain ISSNs as well I have no idea what the number was to start with.

Does any one have a work around for this sort of problem, or know of an option I can use (in SAS or Excel)?

Back to: Top of message | Previous page | Main SAS-L page