Usage Note 9042: How to use SaveAs VBScript method to save query results as an Excel
table using an Enterprise Guide Version 2.0.0.417
The following is an example of a VBScript that executes an Enterprise
Guide Version 2.0.0.417 project that contains a query. The query results
are then saved to an Excel file. The example is as follows:
Dim objGuide
Dim objProject
Set objGuide = WScript.CreateObject("SASEGuide.Application")
Set objProject = objGuide.Open("C:\vbscript.seg")
objProject.Run
Dim objQuery
Set objQuery = objProject.QueryCollection("Query1 for CLASS")
objQuery.Run
Dim objData
Set objData = objQuery.OutputDatasets(1)
objData.SaveAs "C:\vbscript.xls"
objProject.Close
objGuide.Quit
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | SAS Enterprise Guide | Microsoft Windows XP Professional | 2.0 | |
| Microsoft Windows NT Workstation | 2.0 | |
| Microsoft Windows 2000 Professional | 2.0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Date Modified: | 2002-12-23 15:01:25 |
| Date Created: | 2002-12-11 16:05:31 |