Sunday 14 April 2019

Adding a hotlink to an attribute field in QGIS


How to add hotlink to QGIS? I saw this but had some problem. I want to open network location like \\fileserver\filefolder\file1.excel but it ends with error.


Edit: The network location is stored in a column of the table eg. URL column contains URL value for each attribute. Different row has different URL.



Answer



This way it works for me on Windows and Qgis 1.8.0:


Create a point shapefile with a field url of type string. Add a point and fill the url field with


\\\\.xls 


without any blanks or quotation marks unless you have blanks in folder and filenames. Don't forget to save the layer, end leave edit mode.


In the layers properties, create a new action of type Generic , name it open and add


cmd /c [% "url" %] 

as action.


Select the Action icon, move the mouse over the point and click to open the excel sheet. The Excel sheet should have the standard .xls extension.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...