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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1604 views
  • 0 likes
  • 2 in conversation