以编程方式更新托管在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
最满意答案
在Xcode 6中,这个功能似乎已经实现了? 在2010年提出这个问题时,我不能说Xcode的功能。
NSString
,NSNumber
,NSArray
和NSDictionary
值在你的代码中,带有一个断点:当断点断开时,您可以在Xcode“变量视图”中看到这些值。 对于收藏品,您可能需要展开详细信息箭头:
如果右键单击某个变量并选择
"Print Description of variable_name"
,则该对象的-debugDescription
/-description
值将被打印到控制台。 这对于更复杂的集合,也许对于长NSString
值等等通常是有用的。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
, andNSDictionary
values in your code, with a breakpoint:When the breakpoint breaks, you can see the values in the Xcode "Variables View". For collections you may need to expand the details arrow:
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 longNSString
values and etc.
相关问答
更多-
在Xcode 6中,这个功能似乎已经实现了? 在2010年提出这个问题时,我不能说Xcode的功能。 NSString , NSNumber , NSArray和NSDictionary值在你的代码中,带有一个断点: 当断点断开时,您可以在Xcode“变量视图”中看到这些值。 对于收藏品,您可能需要展开详细信息箭头: 如果右键单击某个变量并选择"Print Description of variable_name" ,则该对象的-debugDescription / -description值将被打印到控制 ...
-
为自定义Obj-C对象创建Xcode数据格式化程序包(Creating an Xcode data formatter bundle for custom Obj-C objects)[2022-08-10]
我最近能够回到这一点,我相信我找到了答案。 我已经知道数据格式化程序包必须在内部包含属性列表文件,名为“ 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 ...
-
XCode调试(XCode Debugging)[2023-03-20]
确保使用“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 ...
-
Obj-C内省:一个方法如何引用它所调用的参数(Obj-C introspection: How can a method reference arguments it's called with)[2022-07-18]
关于获取NSInvocation的第一件事就是你无法实现该方法,然后使用正确构造的NSInvocation调用-forwardInvocation: . 但我想这不是直接有用的,因为你需要实现方法并在方法中做一些事情。 但是,也许您可以在-forwardInvocation:执行的-forwardInvocation:调用另一个对象上的调用(“转发调用”),其中该对象上的方法执行实际操作。 然后,您还可以将调用存储在该方法可以访问的某个位置(如有必要)。 或者也许您可以在-forwardInvocation ...