Questions tagged [google-docs]

Questions related to interacting with Google word processing Documents programmatically. Usage questions about the web application should be posted at Web Applications Stack Exchange.

Google Docs is a cloud-based application and service for creating and collaborating on word processing documents. The service supports an internal API for Google Apps Script as well as an External API.

Usage questions about the web application should be posted at Web Applications Stack Exchange or the Google Drive Help Center instead of here.

Note: Google has historically used the brand "Google Docs" to encompass a suite of products, but since conforming to that would introduce ambiguity here, the tag is specifically for word processing documents while refers to the suite.

2953 questions
396
votes
39 answers

wget/curl large file from google drive

I'm trying to download a file from google drive in a script, and I'm having a little trouble doing so. The files I'm trying to download are here. I've looked online extensively and I finally managed to get one of them to download. I got the UIDs of…
Arjun
  • 4,100
  • 3
  • 10
  • 10
151
votes
8 answers

How To Format A Block of Code Within a Presentation?

I am preparing a presentation using Google Slides, though I can also work on the presentation within Open Office that will include code snippets. Is there any easy way to perform basic syntax highlighting on the code snippets with either Google…
Noah Goodrich
  • 23,504
  • 12
  • 61
  • 95
141
votes
10 answers

How to turn off page breaks in Google Docs?

How do I turn off page breaks in Google Docs so I just have a single continuous scrolling document? I don't think this method applies anymore. I never want to print out my Google Docs. The page breaks are distracting and mess up my formatting. (For…
Let Me Tink About It
  • 11,866
  • 13
  • 72
  • 169
121
votes
3 answers

Get first item from Split()

I use the SPLIT function to split a string which looks something like 1.23/1.15. Right now it yields two cells, as it should. But how do I get a certain element from the result? I would like to do something like this: SPLIT("1.23/1.15", "/")[0] to…
filur
  • 1,520
  • 5
  • 18
  • 36
118
votes
6 answers

Google Docs/Drive - number the headings

Is it possible to number the headings in a Google Docs/Drive document?
ZehnVon12
  • 3,398
  • 3
  • 17
  • 23
74
votes
3 answers

ISO-8601 String to Date in Google Sheets cell

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…
Bob Kuhar
  • 9,765
  • 9
  • 56
  • 101
66
votes
5 answers

Count number of cells with any value (string or number) in a column in Google Docs Spreadsheet

I have several columns in Google Spreadsheet. I would like to count how many cells have a value (number or string) and display that number at the top of the column. For example: Hello World 123 Some string The above column would give me the…
steakpi
  • 903
  • 1
  • 6
  • 11
55
votes
2 answers

Alerts when navigating away from a web page

When I try to close my Google docs tab with unsaved changes, this is what I get in my browser (FF 3.5). Are you sure you want to navigate away from this page? You have unsaved changes in this document. Click Cancel now, then 'Save' to save…
Vijay Dev
  • 24,306
  • 20
  • 73
  • 96
53
votes
6 answers

How to define global variable in Google Apps Script

I see most examples from Google is they use only functions in a single giant script. e.g. https://developers.google.com/apps-script/quickstart/macros But in our style, we usually write all functions under a single namespace, such as MyCompany =…
Ryan
  • 9,231
  • 23
  • 77
  • 133
51
votes
7 answers

On Google Spreadsheet how can you query 'GoogleFinance' for a past exchange rate?

I'd like to know if it is possible to query a past exchange rate on Google Spreadsheet. For example; using formula =GoogleFinance("CURRENCY:USDEUR") will return the USD/EUR rate at this present moment. How can you retrieve a historic rate?
antr
  • 837
  • 1
  • 8
  • 19
51
votes
1 answer

How set tab indent to four spaces in google docs

Is it possible to set the default tab indent to four spaces in Google docs? Seems that is only possible to realign the words using the ruler at the top after the text is written...
Luca Fiaschi
  • 2,945
  • 6
  • 27
  • 43
51
votes
4 answers

How do I add formulas to Google Sheets using Google Apps Script?

How do I add a formula like: =SUM(A1:A17) to a range of fields using the Google Apps Script API for Google Sheets?
Pablo Jomer
  • 7,990
  • 6
  • 45
  • 86
49
votes
5 answers

Google Docs - Table of contents with paging

I am working on my Google Docs file and wondering if someone knows how it is possible to make a table of contents with page numbering ? The built-in table of contents won't show numbering. Thanks a lot.
user3580316
45
votes
3 answers

Collapsing Elements in a Google Doc With Google Apps Script - Is This Possible?

I'd love to be able to collapse and expand sections in my Google Docs document, making large documents easier to navigate. I was wondering if this is possible with Google Apps Script, or if I'd be wasting my time trying to find a way.
Squis
  • 791
  • 2
  • 7
  • 12
43
votes
2 answers

Downloading a file with Powershell

The following Google Doc gets exported to CSV and is then downloaded automatically using a standard Web Browser: https://docs.google.com/spreadsheets/d/1wDD_Xm8IQYuYNefv9cOJ_7afTLImHgYA05pfN3qY63E/export?format=csv I'm trying to download this file…
JustAGuy
  • 3,773
  • 8
  • 33
  • 49
1
2 3
99 100