|
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
|