BookmarkSubscribeRSS Feed
Reeza
Super User

You deleted the three bottom lines, saved the script, ran it and it closed your Excel file? Did you see any data paste in?

learner_sas
Quartz | Level 8

Yes . When I ran the program I see Command-like screen for a while and it closes itself after removing last three line as you suggested.

Reeza
Super User

You don't see Excel though?

learner_sas
Quartz | Level 8

No I do not see Excel

Reeza
Super User

Once you've eliminated the path as an issue (ballardw suggestion), which I would first do, try the following:

Save the following as .vbs file anywhere on your desktop and run it. If Excel doesn't launch that's an issue:

Dim objExcel

Dim Newbook

Dim NewSheet

Dim inSheetCount

Set objExcel = CreateObject("Excel.Application")

Set Newbook = objExcel.Workbooks.Add()

objExcel.Visible = True

learner_sas
Quartz | Level 8

It opens an Excel sheet with your code.

learner_sas
Quartz | Level 8

Thank you @reeza  I appreciate your input. Now I think I know what the problem is . When I see command line like pop up there was another pop up I missed before since it is literally for less than 1/10 secs.  It says "The X command is active. Enter EXIT at the prompt in the X command window to reactivate this SAS session."



learner_sas
Quartz | Level 8

Hello and

Here is the update on my problem. I think I am very close to the answer:

I found out that I do not have write access to SAS default temporary folder therefore I directed my temp folder to my own folder in desktop.

I did not know that we have to give default folder name for clip file so I give C:\temp as destination folder for clip.

Finally I am able to copy and paste table ( I used SASHELP.CARS) but will little problem. I am not able to write any variables after  Horsepower variable in SASHELP.CARS. I thought that was LRECl issue and changed value to 32767 but still I am missing last 4 variable in my output. One thing I notice in my Clip.txt file is I am getting more than one tab between two copied column.

I am wondering if you know what would be the issue.

Thank you,

ballardw
Super User

With the path C:\Users\myname\Desktop\  do you actually have "myname" as part of the path on your drive?

learner_sas
Quartz | Level 8

  I have my name first middle and last name. I just thought I should not give my name. Smiley Happy

ballardw
Super User

Understand but if the spelling doesn't match exactly then the path doesn't exist and the macro documentation explicitly says that the path must exist. An extra or missing space might be easy to miss and its easy to check as a possibly problem.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 25 replies
  • 2576 views
  • 0 likes
  • 4 in conversation