FAQ Database Discussion Community


Using the UrlShortener API in a custom Spreadsheet function

google-apps-script,google-spreadsheet,google-docs,add-on,url-shortener
I would like to use an API (url shortener) with a public google Add-on. For the moment my code returns: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup. Is this possible? If yes, Do I need an authentification Token? If yes, what key type should I choose? How...

Apps Script - How Do I Remove A Paragraph Of Text?

google-apps-script,google-docs
I built an app script to copy a doc and edit it based upon the data I have entered into a google spreadsheet. Once the doc is copied and edited, I would like to remove certain text paragraphs. I was using the following to see if I could find the...

Issue applying script to second sheet

google-apps-script,google-docs
I have no idea how to code. I use to make website on HTML, so my knowledge is limited. I piece together and alter existing codes. I got decent on Excel VBA, but then needed to start using google sheets. So, that said... I have a spreadsheet with two sheets,...

Replace first occurrence of text using replaceText(searchPattern, replacement)

regex,google-apps-script,google-docs
I am trying to replace the first occurrence of a paragraph in Google Doc using the function replaceText(searchPattern, replacement), but I can't seem to find the right RegEx expression. If someone could help me I would really appreciate it. body.replaceText("^"+paragraph.getText()+"$"," "); ...

embed pdf file from google docin wordpress

wordpress,google-docs
i am not looking for a plugin solution as i dont want to use a plugin just for this.i am using wordpress >4.0 i am tiring to embed a pdf file i get the embed code form google docs which is like this: <iframe src="https://docs.google.com/document/d/laksdldjlsakdjuikjasoius/pub?embedded=true"></iframe> when i put the code...

Calculating Average in Google doc based on values in other columns

average,google-docs
I want to calculate the average marks obtained by students of set1, set2 and set3. Is there any way to do this....

Disable submit button in Google Forms?

google-apps-script,google-docs,google-docs-api
I'm writing a form and have a multi-select with certain responses (age range); for ranges below a specified value, we redirect users to a page with information on why we don't accept that range currently, etc. The problem is that the form navigation appears on this page, so they can...

Read range value from a STRING cell

google-spreadsheet,google-docs
I have many formulas (20+) using data from some range in a single spreadsheet. The problem is that when I copy those formulas to some other part of the spreadsheet to handle another range, I have to manually modify each of them to adapt them with the new range value...

Output Google Spreadsheet to XML/RSS/Atom using Google AppScript Content Service

xml,google-apps-script,rss,google-spreadsheet,google-docs
So I've searched this site and found nothing really useful so far to accomplish this. I am wanting to turn a spreadsheet into an RSS feed using google script content service. How do I declare column values (i.e. pubDate, Author, Content) so it will output correct RSS/Atom feed. Following their...

How to block rows in a shared spread sheet in google docs

google-docs
I am working on a google spread sheet that has been shared with 10 people. In that I need to insert some where around 60 new records in that spread sheet (and other people are also inserting new records simultaneously). Is there any way that I can lock rows for...

Prevent users from creating new sheets in a shared google spreadsheet

google-spreadsheet,google-docs
I have created a spreadsheet with all sheets protected from editing except for a single cell, where the user is supposed to enter a search value, which filters the sheet. I shared the spreadsheet with enabled editing to allow for that, but that also enables users to create new sheets,...

How to add a comment in a spreadsheet on a tab with a script?

google-apps-script,google-docs,google-apps
I have an accounting spreadsheet for each month of the year consists of 31 tabs appointed to the date Ex Format '15 -03-2015 'for the month of March I am looking for a script that can put a comment on the tab of the current date and possibly displayed the...

Is google phasing out the Google Docs Viewer?

google-api,google-drive-sdk,google-docs,google-apps,google-docs-api
I'm unable to find any reference to the Google Docs Viewer anywhere on the web except on sites from a few years ago. It still works, but I want to be a little more confident before I deploy code that relies on it. Here's an example of the viewer in...

Add text and image to specific cell of a table in Google Doc using Apps Script

arrays,google-apps-script,google-docs,multiple-columns,tablecell
Context: I have a program that creates a photo directory for 6th-12th grade students and leaders/teachers in a google document. For each student, it inserts a picture, and then several separate lines of text (name, phone number, etc.). Before the start of each new grade, text is inserted to label...

Find Regexp debug to the first numeric character

regex,google-apps-script,google-docs
I am trying to retrieve a string of text to the beginning of my first character digital .it may be that there was a line break . I found a java regex syntax but it does not work on GS google script! I attens your advice. Prenom NOM 33 Ans...

Unable to select some text from Google Docs with a simple regex

regex,google-apps-script,google-docs
I'm trying to highlight some text (in the example below I would like to highlight "ORGANIZA") with some regex on a Google Docs document, but I'm unable to make first work a simple regex to find the "category_name" string. Why this: function highlightTextTwo() { /* DOCUMENT DEFINITION */ var doc...

Options method not allowed, CORS to Google Drive

javascript,jquery,cors,google-docs
I've created a script for a google drive which posts to this document. I invoke it with var request = $.ajax({ url: "https://script.google.com/macros/s/AKfycbypnRet5l6gUmoGE8oZV2_6da7fImNU12ejHCHCdOambH7UM2CP/exec", data: serializedData, type: "POST", timeout: 10000, async: true, crossDomain: true }); which works from this jsFiddle. However, when I implement the exact same code into my local...

How to prevent Google Forms from converting form input to scientific notation format

javascript,google-apps-script,google-docs,google-form
I have a simple script set up that sends emails based on Google form entries using a script-based VLookup to get the contact emails. In some cases, Google Forms converts longer numbers entered into the form field to scientific notation. A workaround I have been using is to enter an...

google apps from app engine

google-app-engine,google-apps-script,google-api,google-docs
I want to produce a Google Apps document based on a (Google doc) template stored on the users Google Drive and some XML data held by a servlet running on Google App Engine. Preferably I want to run as much as possible on the GAE. Is it possible to run...

Copy Row if Sheet1 A contains part of Sheet2 C

rss,google-spreadsheet,google-docs,drive,advanced-search
So I'm trying to pull the data in a row from a separate sheet (sheet2!), if part of Col A has the the Date that is in sheet1! C1. Col A ex: "Build 251 at Fri Jun 12 03:03:49 2015" Col C1 ex: "Fri Jun 12" (Changes date every couple...

How to know or calculate empty or blank cells on google sheets?

google-spreadsheet,google-docs
I have a big list of products on google sheets about 900 rows. And on these rows is the information about every product, when customers buy one I put the id of the product in ID product column. Now I want to now how many cells are blank or empty...

Searching upper and lowercase Google Docs scripts

regex,google-apps-script,google-docs
Im trying to make a Google Docs script which replaces certain lines of code from languages i use and converts them to the pseudo code we are using. An example of what im trying to do is below body.replaceText("print","OUTPUT"); I am new to regex but I want to know if...

MATCH() with search_type 1 doesn't work with certain numbers

function,google-spreadsheet,spreadsheet,google-docs
I've read several similar questions but I couldn't find the answer. I've certain number values that the MATCH() function, with the search_type option set as 1, can't retrieve. The best way to explain it, is to share the spreadsheet (here) where you can see in details on which columns the...

How to connect PHP GAE(Google App Engine) to Google Docs, Spreadsheets

php,google-app-engine,google-apps-script,google-spreadsheet,google-docs
I have a PHP app deployed in GAE(Google App Engine) I need to connect to Google Docs, Google Spreadsheet URL below and do all editions/manage(edit a Doc, Edit a Sheet,...etc) as like I am able to do via GAS, just like we manage the CAL API. https://developers.google.com/apps-script/reference/document/ https://developers.google.com/apps-script/reference/spreadsheet/ What...

Nested IF statement to check between values

if-statement,google-spreadsheet,google-docs
I'm struggling with an IF statement in Google Docs. I'm using it financially to find out interest accrued on a value. Interest is either 1%, 2% or 3% depending on the amount. If the amount is between £0 and £1999 then 1% is given If it is between £2000 and...

Google Docs Mail Merge script not working as of last week

javascript,google-apps-script,google-spreadsheet,google-docs
A mail merge script that we use for 5 of our google docs stopped working last week - a similar thing happened a few weeks ago when DocsList became obsolete and I was able to fix it, but now it has stopped working again. var docTemplate = "15kvC3M8b0Me3Vi3GwErQvG60BlTC0qAHMXrlc3Ocky8"; var docName...

How can I omit the property names of my json and just display the values?

javascript,json,google-docs,google-docs-api
I wrote a small api to pull nutrition info from public diaries on MyFitnessPal. I'm pulling this information into a Google Sheet using the ImportJSON.gs found here: https://gist.github.com/paulgambill/cacd19da95a1421d3164 What I get is a two row result: Calories Protein Fat Carbs 2458 196 82 234 My returned json looks like this:...

How can I filter my search in a column on google sheet which collects data from a form?

google-spreadsheet,spreadsheet,google-docs
I would like to perform a multi criteria search of data in a column- contains data of check boxes(more than one option chosen). For a clearer picture of what I am trying to do, screenshot below is a question in a form Data from the form are saved in sheets...

YQL not calling callback function when querying Google Drive

javascript,google-docs,yql
This is my first time using YQL for a project, so apologies if I'm making a stupid error. I'm trying to use YQL to get a list of the contents of a publicly viewable Google Drive folder, which I can then manipulate via Javascript. I'm basing my JavaScript very closely...

How do I get Google search results from urlfetch in google apps script

google-apps-script,google-docs,google-custom-search
I have been trying the following code var response = UrlFetchApp.fetch("https://www.google.com/#q=this+is+a+test"); var contentText = response.getContentText(); Logger.log(contentText); var thisdoc=DocumentApp.getActiveDocument().getBody() ; thisdoc.setText(contentText); Logger.log(contentText.indexOf("About")); But it only seems to return the header, and empty body, and none of the search results. At minimum I should be able to see the "About xxx results"...

ISO-8601 String to Date in Google Sheets cell

google-spreadsheet,google-docs
I have a bunch of ISO-8601 formatted strings in a column of my sheet. How can I get google sheets to treat them as Dates so I can do math on them (difference in minutes between two cells, for example)? I tried just =Date("2015-05-27T01:15:00.000Z") but no-joy. There has to be...

jQuery checks & changes to inputs and dropdowns on a custom Google spreadsheets page

javascript,jquery,html,google-spreadsheet,google-docs
I'm using Google spreadsheets/docs to input data into a spreadsheet via a form on private & local website. I've removed the redirect by following the first reply in: Google Forms: Send data to spreadsheet This is just an example form based of the form: https://docs.google.com/forms/d/1SueoRbKQ4LVp-S5jHyjper-ZVH1W3YgnA1ySoH9nC-k/viewform?usp=send_form Now... I'm trying to make...