I currently have a folder on google drive which contains a google sheet with the list of documents and their links in it. In the same directory, there is another folder with the actual pdf documents listed in the google sheet.
What I want to achieve is to export this folder My Test Folder to my local hard drive. The spreadsheet can be exported to either .pdf
or .html
. But I want to regenerate the hyperlinks in the google sheet to "relative pathing" on local hard drive so that they are now pointed at the downloaded files after exporting and still works. So, basically, the hyperlinks in the picture below should be changed to the local files on the disk.
I have tried to regenerate the hyperlinks in google sheet to <a href="file:///../Test Documents/Test1.pdf> Test1 </a>
using appscript but once it is exported in .html
these show up as text instead of actual hyperlinks.
My question are, is it even possible to implement what I am trying to achieve with Google Appscript only?
If it is possible, could you point me in the right direction how I could implement such function?