Skip to main content

Posts

Showing posts from April, 2021

Get image file links from google drive to Google Sheet cell

  By using formulas, scripts and buttons we can prepare a complete staff records form. In this form we can assign buttons such as entering the data to the data sheet, search details  and clear the form by using script and buttons.  Also, get image file url links in google sheet  cell to display or enter the data along with other other details.  We have detailed script and formulas  below to use this form effectively to maintain the staff records.  SCRIPT function   GdriveFiles () {      const   folderId  =  'YOUR GOOGLE DRIVE FOLDER LINK HERE'    const   folder  =  DriveApp . getFolderById ( folderId )    const   files  =  folder . getFiles ()    const   source  =  SpreadsheetApp . getActiveSpreadsheet ();    const   sheet  =  source . getSheetByName ( 'images' );    const   data  = [];       while  ( files . hasNext ()) {        const   childFile  =  files . next ();        var   info  = [           childFile . getName (),           childFile . ge