title: Google Apps Script to access Google Sheet in a folder via Google Apps Script
body: <p>Suppose I have a drive with the following structure:</p>
  
  <p>Under <em>My drive</em>:</p>
  
  <ul>
  <li><p>google_sheet_E</p></li>
  <li><p>Main_Folder</p>
  
  <ul>
  <li>Folder_A</li>
  <li>Folder_B
  
  <ul>
  <li>google_sheet_C (in google sheet format)</li>
  <li>MS_excel_D.xls (in  excel format, upload to drive directly)</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>Note: google_sheet_E is located on the top layer of the drive, whereas, the C, and D, are located few levels below.</p>
  
  <p>I would like to reference some data from google_sheet_C and MS_excel_D.xls to google_sheet_E.</p>
  
  <p>In Google Apps Script, my current method is to get by ID, but I find this method inconvenient, since I have to get ID every time, therefore I am planning to use the file name instead. Is there any method/function to access a sheet similar to the path system in Windows? (i.e. Traverse the folders.)</p>
  
  <p>Another question: Is there any good method to let users share from their drive to the spreadsheet automatically under a specific path?</p>