Q: use google apps script copy file to my server How can I use Google Apps Script to copy a file in my server or move google spreadsheet file on my server.I am really confused. how can I do that?
So if anyone can suggest me to do that it's really helpful to me. Thanks for the help.
Code: it's code to click and download Google Spreadsheet on my desktop.But I need to automatically download on my server (maybe FTP server).
function downloadXLS() {
  // Get current spreadsheet's ID, place in download URL
  var ssID = SpreadsheetApp.getActive().getId();
  var URL = 'https://docs.google.com/spreadsheets/d/'+ssID+'/export?format=xlsx';

  // Display a modal dialog box with download link.
  var htmlOutput = HtmlService
                  .createHtmlOutput('<a href="'+URL+'">Click to download</a>')
                  .setSandboxMode(HtmlService.SandboxMode.IFRAME)
                  .setWidth(800)
                  .setHeight(60);
  SpreadsheetApp.getUi().showModalDialog(htmlOutput, 'Download XLS');
}

