How can I check to see if a website exists before receiving an error?<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I am trying to create a script that will pull data from different websites. I would like to test if a website exists and if not, then move on to another website. With my current code, if the site does not exist I get a pop up error reading, "Cannot open table in access or evaluation of 'Open' , Open( Full_EI_WEB_Sites[1], invisible, HTML Table( 1 ) )".
Is there something similar to the File Exists() function, but for opening websites?
Thanks
Re: How can I check to see if a website exists before receiving an error?Sorry for the late reply. The Try() function worked perfectly!
Thanks for the help,
Chad
Re: How can I check to see if a website exists before receiving an error?Maybe try the Try(expr, catch expr) function. If the second argument is not included, then the script just runs when the expression throws an error.
bad=expr(dt1=open("not a file.txt"));
good=expr(today());
try(bad,show("bad ran"));
try(good,show("good ran"));