首页 \ 问答 \ 以编程方式更新托管在Google文档上的电子表格(Programatically updating a spreadsheet hosted on google docs)

以编程方式更新托管在Google文档上的电子表格(Programatically updating a spreadsheet hosted on google docs)

我有一个预先存在的电子表格托管在Google文档上。 每个月我都会更新这份文件。 我有一个模板workseet在蔓延,我想克隆然后更新。

我宁愿克隆工作表,而不是从头开始创建它,因为它有一些相当复杂的公式。

我在这里使用的是Google文档的Python api:

http://code.google.com/apis/spreadsheets/data/1.0/developers_guide_python.html

有谁知道如何克隆和复制预先存在的文档中的工作表?

编辑

我似乎迷惑了一位读者。 我没有Excel电子表格。 我只有一个包含模板工作表的Google文档电子表格。

我想克隆这个工作表,重新命名并编辑它。


I've got a pre-existing spreadsheet hosted on google docs. Each month I update this document. I've got a template workseet in the spreadseet that I'd like to clone and then update.

I'd prefer to clone the worksheet rather than create it from scratch as it has some pretty complex formulas.

I'm using the Python api for the google docs here:

http://code.google.com/apis/spreadsheets/data/1.0/developers_guide_python.html

Does anyone know how to clone and copy a worksheet in a pre-existing document?

Edit

I seemed to have confused one reader. I don't have an excel spreadsheet. I only have a Google Docs spreadsheet that has a template worksheet.

I'd like to clone this worksheet, rename it and then edit it programatically.


原文:https://stackoverflow.com/questions/1837937
更新时间:2022-08-14 06:08

最满意答案

在Xcode 6中,这个功能似乎已经实现了? 在2010年提出这个问题时,我不能说Xcode的功能。

NSStringNSNumberNSArrayNSDictionary值在你的代码中,带有一个断点:

代码中的变量

当断点断开时,您可以在Xcode“变量视图”中看到这些值。 对于收藏品,您可能需要展开详细信息箭头:

调试器中的值

如果右键单击某个变量并选择"Print Description of variable_name" ,则该对象的-debugDescription / -description值将被打印到控制台。 这对于更复杂的集合,也许对于长NSString值等等通常是有用的。

在“打印说明”上下文菜单项的Xcode 7中进行屏幕截图

打印到控制台。


In Xcode 6 this feature seems to have been implemented? I cannot speak to the features of Xcode when this question was asked in 2010.

NSString, NSNumber, NSArray, and NSDictionary values in your code, with a breakpoint:

variables in code

When the breakpoint breaks, you can see the values in the Xcode "Variables View". For collections you may need to expand the details arrow:

values in the debugger

If you right-click a variable and select "Print Description of variable_name", the object's -debugDescription / -description value will be printed to the console. This is often useful for more complex collections, and perhaps for long NSString values and etc.

Screen shot in Xcode 7 of “Print Description” context-menu item

printed to the console.

相关问答

更多
  • 在Xcode 6中,这个功能似乎已经实现了? 在2010年提出这个问题时,我不能说Xcode的功能。 NSString , NSNumber , NSArray和NSDictionary值在你的代码中,带有一个断点: 当断点断开时,您可以在Xcode“变量视图”中看到这些值。 对于收藏品,您可能需要展开详细信息箭头: 如果右键单击某个变量并选择"Print Description of variable_name" ,则该对象的-debugDescription / -description值将被打印到控制 ...
  • 我最近能够回到这一点,我相信我找到了答案。 我已经知道数据格式化程序包必须在内部包含属性列表文件,名为“ Contents / Resources / *。plist ”。 但是,要使包实际工作, 还必须在Contents / MacOS /目录中包含一个与该包相同名称的可执行文件 。 据我所知,只要编译和链接二进制文件,即使是完全空的foo.c文件也足够了。 我甚至不必触摸Xcode中的股票CFPlugin Bundle项目的Info.plist,只需将CustomDataViews.plist包含在目标 ...
  • 仅当变量具有声明的关联属性,或者存在可用的键值编码兼容访问器方法时,才可以使用点符号。 属性语法允许你为符合Key-Value-Coding的变量“综合”访问器方法,而且这实际上就是点符号的工作方式。 当声明属性时, someObject.variable等同于[someObject variable] 。 当一个对象被键入为id时,编译器不知道该对象具有的任何属性。 id是指向任何对象的指针,实际上是一个void *。 你可以将你的对象转换为你期望的类型,这样你可以使用属性语法。 ((MyObject*) ...
  • 从Swift 1.2版(Xcode 6.3)可以。 简单地用@objc在枚举声明前缀 @objc enum Bear: Int { case Black, Grizzly, Polar } 无耻地从Swift博客中获取 在Objective-C中,这看起来像 Bear type = BearBlack; switch (type) { case BearBlack: case BearGrizzly: case BearPolar: [self runLike ...
  • 这些指令被打破,因为-force_load需要一个参数,这就是-Obj-C显示未找到文件的原因。 从ld手册: -force_load path_to_archive加载指定静态归档库的所有成员。 注意: -all_load强制加载所有归档的所有成员。 此选项允许您定位特定存档。 除非您知道要强制加载的库的名称,否则您可以删除该参数并将-Obj_C在Other Linker Flags中 。 我相信无论如何都会有所作为。 编辑: 这个答案显示你可以使用: -force_load $(BUILT_PRODUC ...
  • 我建议检查的最简单的解释是,“if”和“else if”中的条件是否在运行时评估为false。 对于给定的输入字典而言,两者都可能是错误的似乎是合理的。 我建议对每个条件进行断点,或者将每个条件下的检查值记录到控制台。 如果“if”表达式既不是true,也不是那些给定值的“else if”表达式,那么你就得到了答案! The most simple explanation I would suggest checking is if whether the condition in the "if" and ...
  • 尝试将handler块存储到视图控制器的实例变量中(或者您所在的任何类)。 假设您声明了一个名为_hander的实例变量: { void (^_handler)(NSURLResponse *, NSData *, NSError*); } 将您的代码更改为: __weak __typeof(&*self)weakSelf = self; _handler = ^(NSURLResponse *response, NSData *data, NSError *error) { [dataArray ...
  • 确保使用“Debug”构建配置。 调试版本生成调试符号并禁用代码优化,否则调试器显示的信息可能不准确。 您可以在Mac OS X参考库中找到有关此主题的更多信息。 Be sure you are using the "Debug" build configuration. Debug builds generate debug symbols and disable code optimization, otherwise the information shown by the debugger may ...
  • 不确定原因,但编译器无法推断出三元运算符的结果的估计类型。 简单地添加一个显式的演员似乎工作: transition.subtype = (NSString *)(flipsideView.hidden == YES ? kCATransitionFromRight : kCATransitionFromLeft); 我将此文件作为编译器错误提交。 Not sure exactly why, but the compiler is not able to deduce the evaluated type ...
  • 关于获取NSInvocation的第一件事就是你无法实现该方法,然后使用正确构造的NSInvocation调用-forwardInvocation: . 但我想这不是直接有用的,因为你需要实现方法并在方法中做一些事情。 但是,也许您可以在-forwardInvocation:执行的-forwardInvocation:调用另一个对象上的调用(“转发调用”),其中该对象上的方法执行实际操作。 然后,您还可以将调用存储在该方法可以访问的某个位置(如有必要)。 或者也许您可以在-forwardInvocation ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)