8 Replies Latest reply on Dec 13, 2018 2:17 PM by Mike Greenblatt

    Open a local file with url link?

    Alan Kwan

      Hi all,

       

      I have a dashboard that wants to be linked a local directory and opens an excel file on action select. Is that possible?

       

      I set up an url action on a sheet, it works in the local workbook, however when I publish it on the server it doesn't work anymore.

       

      Under the URL, I have

       

      \\123.121.23.124\Tableau\.... xlsx

       

      Any suggestions?

       

      Thanks,

      Alan

        • 1. Re: Open a local file with url link?
          Russell Christopher

          Hi Alan.

           

          Interesting question. Here are some notes from a support case for a user running into the same issue. Hope they help you!

           

          After some additional investigation and input from our engineers, I believe that the main issue here is incorrect syntax when specifying the UNC path in the URL action. The URL action edit dialogue expects a valid web URL and, as such, UNC paths should be formatted as follows:


          file://server/folder/file.pdf


          All slashes should be forward-slashes as used in typical web URLs. Even with the correct syntax, however, the URL action will only correctly open the external file when using Internet Explorer. The Tableau Server URL must also reside in the intranet zone or trusted sites in the Internet Explorer security settings. And for what it's worth, it appears that using the unmodified UNC path (technically incorrect syntax) also works in Internet Explorer as long as the Tableau Server resides in the intranet zone or trusted sites.


          Google Chrome and Firefox will still not work as there is no similar intranet zone or trusted sites option and because Chrome and Firefox do not appear to fully support Windows Active Directory authentication with regards to access to network resources. Unfortunately, these issues are browser issues and not something we can fix from the Tableau side.


          To workaround this issue, users will either need to use Internet Explorer or, as previously suggested, host the PDF file in an actual web server and use the web based URL in the URL action.

          3 of 3 people found this helpful
          • 2. Re: Open a local file with url link?
            Alan Kwan

            Hi Russell,

             

            Thanks for the reply. I have tried using the file://123.123.23.12/....

             

            Unfortunately, if i do

            file://123.123.12.1/test/abc.xls

             

            This does not open the excel file.

             

            The current workaround I have is to let the path be 1 level above, meaning

            file://123.123.12.1/test/

             

            And then let the user click into the file themselves.

             

            Any alternatives?

             

            Thanks,

            Alan

            • 3. Re: Open a local file with url link?
              Russell Christopher

              I tested the technique I mentioned before posting and it worked fine for me with a PDF.

               

              Perhaps your browser handles the MIME types xls / xlsx differently and doesn't allow it to be opened directly via the browser? Are you seeing the same behavior with other file types, like PDF or TXT?

              • 4. Re: Open a local file with url link?
                Alan Kwan

                Hey Russell,

                 

                I tried with a .txt file, but no luck. the browser opens with a blank page. I will just have to leave it 1 level above.

                 

                Do you know if it is possible to pass the parameters in the tableau dashboard into an excel file?

                 

                The situation for me is, the dashboard is showing someone's stats by selecting his/her name in a parameter, I want to be able to pass that name selected into excel. This sounds very unlikely to me, but is that possible?

                 

                Thanks,

                Alan

                • 5. Re: Open a local file with url link?
                  Baji Bonam

                  Hi,

                   

                  Have you found any solution/workaround for this?

                   

                  I have a similar situation. I need to display a text written in a file. And there will be a new file each month.

                   

                  It works perfectly fine when I open it in the desktop tool, but the server always shows it as a blank page?

                  • 6. Re: Open a local file with url link?
                    Chris West

                    There still is no workaround for Firefox and Chrome. Both deem opening links that way as a security risk.

                     

                    You noted that this does not work:  file://123.123.12.1/test/abc.xls

                     

                    Try this:  e.g.   file://///host/sharedFile

                    file://///123.123.12.1/test/abc.xls

                     

                    See this web site for other suggestions: How to open local file url link (locallink) from a webpage

                     

                    Regards,

                    Chris

                    • 7. Re: Open a local file with url link?
                      Matthew Walworth

                      Hi Alan,

                       

                      You can accomplish opening files using urls. I am not sure what your exact problem is but try different file types and paste the desired path into windows explorer to make sure it works. If you can't put the path together and paste it into windows explorer Tableau won't make it work.  Ultimately you will run into the following issue when trying to accomplish the action from a dashboard:

                       

                      Allow file:/// URL Actions to be enabled (Released in 9.0)

                       

                      Can anyone comment on blocking url actions and whether there is currently an option in Tableau 9.2 to allow for such actions with in a trusted network?

                       

                      Thanks

                       

                      MJ

                      • 8. Re: Open a local file with url link?
                        Mike Greenblatt

                        This worked for me (tableau v 2018.2)
                        1. Configure Tableau Server: whitelist the “file” scheme by running cmd as admin per this KB.
                        https://onlinehelp.tableau.com/current/server-linux/en-us/cli_configuration-set_tsm.htm
                        *note you may need to use the syntax below

                         

                        tsm configuration set -k vizqlserver.url_scheme_whitelist -v "http, https, gopher, mailto, news, sms, tel, tsc, tsl, file"

                         

                        Then per the KB you will run these cmds to verify.

                         

                        tsm pending-changes list

                         

                        tsm pending-changes apply



                        2. Configure the user’s IE: Enter your tableau server site name or ip address into Trusted Sites in your client IE.

                        *note this whole deal does not work in other browsers – has to be IE.

                         

                        3. Configure the URL action in Tableau Desktop: Create a worksheet and a calculated field that is just text. Something like  click me. Create a worksheet URL action and enter the file. file://FILESERVER/Folder/File.xxx     xxx is whatever extension your file is.

                         

                        4. Create a Click me row label: Set the click me field on the rows shelf. In my case I had no data on the viz. When I clicked the Row header, the URL action worked, When I clicked the empty value on that row, it did not work. I suspect because there is no data on the viz. So I made the value area very narrow so that folks would click on the header.

                        click_me.PNG

                        5. Publish and open in IE: Click your button and note that IE generates a prompt to run or save.

                        IE RUN.PNG