BookmarkSubscribeRSS Feed
Brandon16
Obsidian | Level 7

Hi,

 

I have multiple tabulates within my SAS code but when I come to connect it in excel via the web connection, I get this error message

 

This file could not be accessed. Try one of the following:

- Make sure the specific folder exisits

- Make sure the folder contains the file is not read only

- Make sure the file name does not contain any of the following charecters < > ? [  ] : | or *

- Make sure the file/path name doesn't contain more than 218 charecters

 

All of these seem fine so I am at a loss as to why it won't work. Any ideas please? 

 

This is the HTML SAS String used 

ods html body="X:/location/Dep/Area/KTY.HTML" style=HTMLBlue;

 

Then closed off the tabulate with 

run;
ods html close;

 

I have tried to open it with Internet explorer and Chrome but neither work. 

4 REPLIES 4
Miracle
Barite | Level 11

Hi Brandon,

Try this instead

ODS HTML path='X:\location\Dep\Area\' body='KTY.HTML'
Brandon16
Obsidian | Level 7

I get this error message when running with that code 

 

'body=
___
22
202
16 ! 'KTY.HTML'
ERROR 22-322: Syntax error, expecting one of the following: ;, (, ANCHOR, ARCHIVE, ATTRIBUTES, BASE,
BODY, CHARSET, CLOSE, CODE, CONTENTS, CSS, CSSSTYLE, ENCODING, FILE, FRAME, GFOOTNOTE,
GPATH, GTITLE, HEADTEXT, IMAGE_DPI, LAYOUT, METATEXT, NEWFILE, NOGFOOTNOTE, NOGTITLE,
OPTIONS, PACKAGE, PAGE, PARAMETERS, PATH, RECORD_SEPARATOR, RENDER, STYLE, STYLESHEET,
TEXT, TRANTAB.
ERROR 202-322: The option or parameter is not recognized and will be ignored.

Miracle
Barite | Level 11

But it works fine for me Smiley Frustrated

ods html path='C:\Users\Wong\Desktop\' body='cars.html';
proc print data=sashelp.cars; run;
ods html close;

 

7    ODS HTML path='C:\Users\Wong\Desktop\' body='cars.html';
NOTE: Writing HTML Body file: cars.html
8    proc print data=sashelp.cars; run;

NOTE: There were 428 observations read from the data set SASHELP.CARS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.48 seconds
      cpu time            0.31 seconds


9    ods html close;








 

 

Brandon16
Obsidian | Level 7
I think the issue is on our drive, I have moved location and it now works fine. Thanks anyway.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 783 views
  • 0 likes
  • 2 in conversation