Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel超链接需要不必要的额外登录_Excel_Google Chrome_Url_Hyperlink - Fatal编程技术网

Excel超链接需要不必要的额外登录

Excel超链接需要不必要的额外登录,excel,google-chrome,url,hyperlink,Excel,Google Chrome,Url,Hyperlink,我使用类似以下内容创建了excel超链接:=超链接(“&A1”) 当我点击它时,它会在Chrome中打开一个新的标签,要求我登录(该页面有敏感信息,需要用户验证),尽管我以前已经登录过 但是,如果我从单元格复制并直接粘贴到Chrome的url栏中,它会自动将我带到页面,而无需再次登录 有什么办法可以回避这个问题吗?请参阅以下作者对类似问题的回答: 在公用文件夹中创建redirect.html页面(公用文件夹,因为您正在使用ROR) 将此复制到您的redirect.html 请稍候,正在加载您

我使用类似以下内容创建了excel超链接:=超链接(“&A1”)

当我点击它时,它会在Chrome中打开一个新的标签,要求我登录(该页面有敏感信息,需要用户验证),尽管我以前已经登录过

但是,如果我从单元格复制并直接粘贴到Chrome的url栏中,它会自动将我带到页面,而无需再次登录

有什么办法可以回避这个问题吗?

请参阅以下作者对类似问题的回答:

  • 在公用文件夹中创建redirect.html页面(公用文件夹,因为您正在使用ROR)
  • 将此复制到您的redirect.html
  • 
    请稍候,正在加载您的页面。。。
    函数getQuerystring(键){
    key=key.replace(/[\[]/,“\\\[”)。replace(/[\]]/,“\\\]”);
    var regex=new RegExp(“[\\?&]”+key+“=([^&\]*)”;
    var query=regex.exec(window.location.href);
    返回查询[1];
    }
    window.location=“http://”+window.location.host+“/”+getQuerystring('page');
    
    应修改您在excel中构建的链接

    例如,旧链接-
    http://test.com/post/comments/1
    新链接应该是 -
    http://test.com/redirect.html?page=post/comments/1

    您需要将URL的一部分(在基本URL之后)作为参数传递 工作

    当用户单击excel中的链接时,它会指向redirect.html和 javascript构造实际的URL并再次重定向到正确的URL 页面,如果用户已登录,则将导航到实际页面 已重定向到登录/主页


    虽然此链接可以回答问题,但最好在此处包含答案的基本部分,并提供链接供参考。如果链接页面发生更改,只有链接的答案可能会无效。谢谢,我刚刚添加了。我也遇到了同样的问题,所以我在服务器上实现了类似的功能。我将包括一个带有示例的google工作表和php/javascript的源代码。这是链接
     <html>
     <body>
     Please wait, loading your page... 
     <script type="text/javascript">
         function getQuerystring(key) {
             key = key.replace(/[\[]/,"\\\[").replace(/    [\]]/,"\\\]");
             var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
             var query = regex.exec(window.location.href);
             return query[1];
         }
         window.location = "http://" + window.location.host + "/" + getQuerystring('page');
     </script>
     </body>
     </html>