google-docs

How to Add google doc viewer in mvc4 Applicaton?

╄→гoц情女王★ 提交于 2019-12-11 19:19:26
问题 I am beginner in programming. My problem is, I want to show PDF files in Google Doc Viewer in my website page. I put my PDF files in folder named as Bullettin , it is in App_Data folder. How can I view this PDF file in my website through Google Doc Viewer using C# MVC4 application? i used the following code in view page http://docs.google.com/viewer?url=http://localhost:3907/App_Data/Bullettin/JCI.pdf&embedded=true" target="_blank" class="embed">View 回答1: You should use the following url for

How to set Paragraph Attributes for a Row / Cell in Google Docs?

心不动则不痛 提交于 2019-12-11 17:44:32
问题 I can insert a table in a Google Document. I manage to change some of the Attributes of each row (like font size, bold, padding). However, paragraph Attributes I get stuck at. Like LINE_SPACING, SPACING_AFTER, SPACING_BEFORE. How do I set the Attributes of a table row and table cells? And while I'm at it :-), how to put a bullet list in a cell? Much obliged. 回答1: ==== update ==== Found the answer tabel.getRow(0).getCell(1).getChild(0).asParagraph().setAttributes(something) 来源: https:/

How to trigger google doc script with button or by editting it?

邮差的信 提交于 2019-12-11 17:42:02
问题 I'm trying to summarize info sent by a form (to make purchase requests) on a google doc with a way to approve the request or not from the google doc and retrieve the information in a Google Apps Script function. The problem is that on Google Document the trigger onEdit doesn't exist. Is there a way to create one ? Or simply add a button to validate the request that would call a function ? Thanks. 回答1: The only way to add a button that calls an Apps Script function on a Google Documents

Google Apps Script problem using getLinkUrl(offset)

安稳与你 提交于 2019-12-11 17:14:52
问题 I'm trying to figure out how to use getLinkUrl(offset) in Google Apps Script. I found the reference here - http://googlescriptreference.com/Document/Text/getlinkurloffset/, but I can't find any examples online. This GAS returns Paragraph in the logs var paragraph = tableCell.getChild(0); This GAS returns the text string in the paragraph in the logs var paragraphText = paragraph.getText(); This GAS returns NULL in the logs var paragraphText = paragraph.getLinkUrl(); This GAS returns an error (

How to replace URL within hyperlinks in multiple Google Docs with a Google Apps script

回眸只為那壹抹淺笑 提交于 2019-12-11 16:54:30
问题 Background: I have about 1500 Google Docs in a Google Services account shared directory. Some of those docs have hyperlinks. I need to replace the URL in hyperlinks with new URLs using a Google Script. I found this script here. The script below will successfully replace URL's within the body of any Google Doc in my drive, but it will not replace any URL's within hyperlinks. How can I modify this script to replace the URL within a hyperlink instead of just the body text? var files = DriveApp

Need help optimizing our Google Docs API for document.batchupdate

烈酒焚心 提交于 2019-12-11 16:42:55
问题 We are using Google docs api-document.generate function to generate templates and documents.BatchUpdate function to replace/merge various kinds information like text, URL's, images and tables with values inside the templates. During document.BatchUpdate function we are sending a JSON more than 200 objects with "WriteControl" and it has some custom code to handle our tables- text color, conditional logics, URLS and Inline images. Google Docs API is typically taking 20-60 seconds for loading a

Section Word Count in Google Docs

馋奶兔 提交于 2019-12-11 12:45:13
问题 Is it possible for a Google Docs add-on to count word per heading (section)? The following image shows what I want. Is there a way to display this kind of word count information in a sidebar or any other way? 回答1: Here is a script that does this. In Google Docs, headings are a kind of paragraph distinguished by their getHeading() attribute. There are thus 9 levels of paragraphs: title, subtitle, h1... h6, and normal. The script first finds the level of each paragraph and the word count of

Accessing google docs spreadsheet revisited in 2014

喜欢而已 提交于 2019-12-11 11:17:06
问题 I am trying to access a google spreadsheet through php (by adding &output=csv to the link) It seems like google does not want this any more, is this correct? I tried file_get_contents (and yes, allow_url_fopen is turned on,) which results in an error. When using CURL, even when setting a valid user agent (I used Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 ) I get a notice that the file has temporarily moved. The link I am using works fine with

Extract DOCX Comments

纵饮孤独 提交于 2019-12-11 08:55:07
问题 I'm a teacher. I want a list of all the students who commented on the essay I assigned, and what they said. The Drive API stuff was too challenging for me, but I figured I could download them as a zip and parse the XML. The comments are tagged in w:comment tags, with w:t for the comment text and . It should be easy, but XML (etree) is killing me. via the tutorial (and official Python docs): z = zipfile.ZipFile('test.docx') x = z.read('word/comments.xml') tree = etree.XML(x) Then I do this:

Using onEdit in Google Spreadsheets to edit cell contents live

一笑奈何 提交于 2019-12-11 08:33:31
问题 I'm having the hardest time getting my onEdit script to work. My work has a Phone Log sheet that we use to track phone calls (Date, Time, Assigned Tech, etc). We have another sheet set up as a pivot table report called Phone Calls by Tech. This sheet is supposed to automatically count the number of calls per day per tech. It works, but the problem is any time extra whitespace gets added to a cell in the Assigned Tech column in the Phone Log sheet, the Phone Calls by Tech sheet treats that as