Date: Fri, 24 Jun 2005 14:16:55 -0700
Reply-To: "Pardee, Roy" <pardee.r@GHC.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Pardee, Roy" <pardee.r@GHC.ORG>
Subject: Re: SAS to excel.
Content-Type: text/plain; charset="us-ascii"
Color me skeptical (on the demise of vbscript). I can certainly see asp
classic & maybe even VBA getting de-supported, but ms seems to be
pushing sysadmins toward WSH full bore. I have a hard time imagining ms
telling the MCSE set that they'll need a compiler if they want to
automate stuff...
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Alan Churchill
Sent: Friday, June 24, 2005 1:58 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS to excel.
Actually, I haven't heard of a continuation of vbscript. At TechEd, they
were touting XML as the basis of all of Office and .NET as the
controlling framework. That seems to imply VB.NET and C# as the main
languages for Office in the future.
Check this link out:
http://www.devx.com/DevX/Article/15821
Thanks,
Alan
Savian
"Bridging SAS and Microsoft Technologies"
http://www.savian.net
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Barz, Ken
Sent: Friday, June 24, 2005 1:39 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS to excel.
>>Also, vbscript is going to go the way of dde.
Granted, but there will be a .net flavor of both it and jscript
(javascript, ecmascript) or so that's what I hear. I actually saw
something where they were talking about Cobol.net, Fortran.net, and
APL.net. (Boy those were the days.)
I've actually spent the last few years away from SAS, working more with
VB.Net and SQL Server before hiring on in this SAS job. I guess when I
think about how I would do it with .Net, the SAS tagset approach seems
excruciating. Ken
-----Original Message-----
From: Alan Churchill [mailto:SASL001@savian.net]
Sent: Friday, June 24, 2005 2:06 PM
To: Barz, Ken; SAS-L@LISTSERV.UGA.EDU
Subject: RE: SAS to excel.
Ken,
Delimited works. However, without the metadata, there is no way to tell
Excel about formatting, data types, etc. unless those are already
defined. XML handles this nicely and, while seemingly daunting at first,
is easy to work with since Excel creates the initial template for you.
Just some considerations.
Also, vbscript is going to go the way of dde. It works and will for some
time but it is on its last iteration. The future of Office is XML and
.NET.
Thanks,
Alan
Savian
"Bridging SAS and Microsoft Technologies"
http://www.savian.net
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Barz, Ken
Sent: Friday, June 24, 2005 12:56 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS to excel.
As dde hasn't been supported for quite some time and the tag based
solutions seem pretty complicated, I opted to have SAS do its thing and
save down to a csv file. The SAS calls the following vbscript to have
an excel macro take it from there with formatting and subtotaling and
whatnot:
Option Explicit
Dim strDate, strCmd, strErr,rc
' Check for arguments
If (Wscript.Arguments.Count < 2) Then
Wscript.Echo "Required Parameter missing"
Wscript.Quit
End If
' Retrieve arguments
strDate= Wscript.Arguments(0)
strErr = Wscript.Arguments(1)
' Command string for macro "LoadData" with one parameter
strCmd = "'" & "LoadData """ & strDate & """'"
If strErr = "0" Then
Dim objXL
Set objXL = WScript.CreateObject("Excel.Application")
objXL.DisplayAlerts = FALSE
objXL.WorkBooks.Open "\\Inmrc\temp\Reports.xls"
objXL.Visible = FALSE
objXL.Run(strCmd)
objXL.Quit
Set objXL = Nothing
rc = 1
Else
rc = 2
End If
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Arthur Tabachneck
Sent: Thursday, June 23, 2005 4:50 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS to excel.
David,
You might want to take a look through the various papers and code at:
http://www.sas-consultant.com/professional/papers.html
Art
-------
On Thu, 23 Jun 2005 21:54:20 GMT, david <mcs@FIINTL.COM> wrote:
>what is the most efficient way for generating output via sas to
specific
>cells within an excel spreadsheet?
>
>our network is set up so that programs are unable to be locally
submitted?
>
>if any kind soul could also point me in the direction of some sample
>code, that would be gratefully appreciated.
>
>thanks
>
>david.