LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 8 Nov 2010 23:47:01 -0700
Reply-To:   Alan Churchill <alan.churchill@SAVIAN.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Alan Churchill <alan.churchill@SAVIAN.NET>
Subject:   Re: Retrieving Excel worksheet names on Unix without PC Files Server
Content-Type:   text/plain; charset="us-ascii"

What version of Excel?

Alan

Alan Churchill Savian Work: 719-687-5954 Cell: 719-310-4870

-----Original Message----- From: Scott Bass [mailto:sas_l_739@YAHOO.COM.AU] Sent: Monday, November 08, 2010 5:26 PM Subject: Retrieving Excel worksheet names on Unix without PC Files Server

Hi,

Summary: is it possible to retrieve a list of worksheet names from an Excel file residing on Unix, without the use of a PC Files Server?

Details: Our Unix machine has SAS/ACCESS Interface to PC Files, but does not have SAS/ACCESS Interface to ODBC. We are not running a PC Files Server.

I can import an Excel worksheet directly if I supply the sheet name:

PROC IMPORT DBMS=XLS PATH="whatever" ... ; SHEET="Sheet1$"; RUN;

However, I'm trying to write a generic macro, where in theory the individual worksheet names are "unknown" to the end user. If I could programatically get the worksheet names, I could generate the necessary code.

On Windows, I can get the worksheet names by 1) libname ... excel, then the dictionary tables, 2) libname ... odbc, 3) use a vbscript, and filename ... pipe. There may be other ways.

I believe Perl has modules that can retrieve worksheet names, but this code may need to run under EG without the -allowxcmd option. Plus it would require installing Perl modules on our Unix machine; the chances of that are about zero :-/

Given the above scenario, any bright ideas on how I can get the list of worksheet names in an Excel workbook that has been uploaded to Unix?

Thanks, Scott


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