Sök…


Anmärkningar

Det är också möjligt att få en fil via filens URL. En fils ID finns i url-adressen, så att använda ID istället för hela URL: en betyder att parametern är kortare. Att lagra URL i stället för ID tar mer utrymme.

Hämta en fil från Google Drive med fil-ID

function getGoogleDriveFileById(id) {
  var file;
  
  file = DriveApp.getFileById(id);//Returns a file - The "id" must be a string
  
  //One way to manually get a file ID
  // - Open the file from Google Drive
  // - The file ID is in the URL in the browsers address bar
  //https://docs.google.com/spreadsheets/d/File_ID_is_here/edit#gid=0
};


Modified text is an extract of the original Stack Overflow Documentation
Licensierat under CC BY-SA 3.0
Inte anslutet till Stack Overflow