google-apps-script

Moving google apps script to v8 file upload stopped working from sidebar

浪子不回头ぞ 提交于 2020-05-20 10:53:30
问题 I have a script running that works as intended. But moving the script to v8 makes the script not working. And I can't find a solution. I've cleaned up the script and tested it in the old engine and still works, but in v8 still doesn't working. It's a sidebar in a spreadsheet where to upload a single file to my google drive. Here the basic in the Html file <body> <h1>File Uploader</h1> <form> <input type="file" name="myFile" id="file"> <br> <input class="blue" type="button" id="submitBtn"

Moving google apps script to v8 file upload stopped working from sidebar

﹥>﹥吖頭↗ 提交于 2020-05-20 10:53:10
问题 I have a script running that works as intended. But moving the script to v8 makes the script not working. And I can't find a solution. I've cleaned up the script and tested it in the old engine and still works, but in v8 still doesn't working. It's a sidebar in a spreadsheet where to upload a single file to my google drive. Here the basic in the Html file <body> <h1>File Uploader</h1> <form> <input type="file" name="myFile" id="file"> <br> <input class="blue" type="button" id="submitBtn"

Moving google apps script to v8 file upload stopped working from sidebar

安稳与你 提交于 2020-05-20 10:53:07
问题 I have a script running that works as intended. But moving the script to v8 makes the script not working. And I can't find a solution. I've cleaned up the script and tested it in the old engine and still works, but in v8 still doesn't working. It's a sidebar in a spreadsheet where to upload a single file to my google drive. Here the basic in the Html file <body> <h1>File Uploader</h1> <form> <input type="file" name="myFile" id="file"> <br> <input class="blue" type="button" id="submitBtn"

ocr images from list of urls and store the results in spreadsheet

拥有回忆 提交于 2020-05-18 05:15:21
问题 Hello I have a list of image URLs that contain numbers and I want to OCR them and store the results in google spreadsheet I've found these google scripts to ocr images 1- https://gist.github.com/tagplus5/07dde5ca61fe8f42045d 2- https://ctrlq.org/code/20128-extract-text-from-image-ocr But I didn't know how to create a request variable so I've replaced request variable with URL variable like this: function doGet(url) { if (url != undefined && url != "") { var imageBlob = UrlFetchApp.fetch(url)

ocr images from list of urls and store the results in spreadsheet

帅比萌擦擦* 提交于 2020-05-18 05:15:13
问题 Hello I have a list of image URLs that contain numbers and I want to OCR them and store the results in google spreadsheet I've found these google scripts to ocr images 1- https://gist.github.com/tagplus5/07dde5ca61fe8f42045d 2- https://ctrlq.org/code/20128-extract-text-from-image-ocr But I didn't know how to create a request variable so I've replaced request variable with URL variable like this: function doGet(url) { if (url != undefined && url != "") { var imageBlob = UrlFetchApp.fetch(url)

Modifying a flexible Google Sheets onEdit script to accommodate a wider range of inputs

巧了我就是萌 提交于 2020-05-17 08:49:17
问题 Below is a script that allows me to combine five different onEdit functions into a single function. function onEdit(e){ if (e.range.getA1Notation() != "H12" || e.value != "submitResponse") return; var sh = SpreadsheetApp.getActiveSpreadsheet(); var ss = sh.getActiveSheet(); var m = sh.getSheetByName("Master"); ss.getRange(2,1,ss.getLastRow(),3).copyTo(m.getRange(m.getLastRow()+1,1,ss.getLastRow(),3)); ss.getRange('H12').clearContent(); e.range.clearContents(); } I'm now hoping to make this

Copy non-empty Range from one tab, and paste at end of another tab, and copy down formulas to the right of the paste range

天大地大妈咪最大 提交于 2020-05-17 07:46:08
问题 I used this to copy the non-empty cells from One tab (CopyFromTab), to another tab (PasteToTab). However, when it adds new rows to the PasteToTab... the formulas to the right of the pasted content (on the PasteToTab) do not copy down (on the PasteToTab). Is there a way for this to Copy Formulas down in new rows on the PasteToTab (these formulas that need to be copied down are in cells to the right that use the data from the pasted content) function CopyNotEmptyToDifferentTab(){ var ss =

Change Google Apps Script from printing array from active cell to specific sheet and range

落花浮王杯 提交于 2020-05-17 07:45:28
问题 I'm trying to figure out how to tell the script to print to a specific sheet named ' Creative ' and starting in cell B2 . Instead of printing to The code, I'm using the code below. Thanks so much for any help you can offer. function getFileArray(folderId){ var folder = DriveApp.getFolderById(folderId); var files = folder.getFiles(); var fileList = []; //Loop though files and add names and urls to the array while (files.hasNext()){ var file = files.next(); var fileName = file.getName(); var

Change Google Sheet data based on user selection in Google Site (Web App)

若如初见. 提交于 2020-05-17 07:13:57
问题 I am making a google site which shows a drop down based on data coming from a Google Sheet. It works. As next step, I want that when the user select a drop down choice from the list, the value which is selected is written in Google Sheet cell (in the example below, the selected value will be written in Sheet: "Dashboard", cell: B92). For example, assume that the drop down list has the following values coming from the Sheet: "Item 1", "Item 2", "Item 3". When the user select "Item 1" from the

How can I fix this exception when working with text finder and merged cells in a loop?

ⅰ亾dé卋堺 提交于 2020-05-17 07:06:42
问题 I have a textFinder command wrapped in a for-loop. I believe the issue is with textFinder, but the same error occurs when wrapping the same string I've asked textFinder to find in logger.log(). It runs fine on the first pass, but it returns this error in the second pass. Exception: You can't perform a paste that partially intersects a merge. There is no pasting going on here. The cells I'm looking for are merged, but it doesn't take issue with those in the first pass. I'm wondering if it just