- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
刚刚发现googlesheets打包并发现它到目前为止非常有用。我现在希望能够替换现有工作表中的全部或部分内容。
例子:
> library(googlesheets)
> set.seed(10)
> test1 <- data.frame(matrix(rnorm(10),nrow = 5))
> test1
X1 X2
1 0.01874617 0.3897943
2 -0.18425254 -1.2080762
3 -1.37133055 -0.3636760
4 -0.59916772 -1.6266727
5 0.29454513 -0.2564784
> gs_new("foo_sheet", input = test1, trim = TRUE)
> test1$X2 <- NULL
> test1
X1
1 0.01874617
2 -0.18425254
3 -1.37133055
4 -0.59916772
5 0.29454513
gs_new()
覆盖但遇到以下警告消息:
> gs_new("foo_sheet", input = test1, trim = TRUE)
Warning message:
At least one sheet matching "foo_sheet" already exists, so you may
need to identify by key, not title, in future.
foo_sheet
正在创建一个新的
key
,但不会替换现有工作表,因此会生成
key
如果我们尝试注册更新的工作表,则会出错
gs_title("foo_sheet")
Error in gs_lookup(., "sheet_title", verbose) :
"foo_sheet" matches sheet_title for multiple sheets returned by gs_ls() (which should reflect user's Google Sheets home screen). Suggest you identify this sheet by unique key instead.
foo_sheet
与
gs_read("foo_sheet")
,API 将返回原始工作表,而不是新工作表。
> df <- gs_read("foo_sheet")
> df
X1 X2
1 0.01874617 0.3897943
2 -0.18425254 -1.2080762
3 -1.37133055 -0.3636760
4 -0.59916772 -1.6266727
5 0.29454513 -0.2564784
gs_delete("test1")
删除工作表。然后创建一个新的。或者,可以使用
gs_edit_cells()
清空单元格,但希望有某种形式的覆盖功能。
最佳答案
我发现编辑单元格功能是一个很好的解决方法:
gs_edit_cells(ss = "foo_sheet", ws = "worksheet name", input = test1, anchor = "A1" trim = TRUE, col_names = TRUE)
关于使用 R googlesheets 包替换 googlesheet 的所有内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41695226/
刚刚发现googlesheets打包并发现它到目前为止非常有用。我现在希望能够替换现有工作表中的全部或部分内容。 例子: > library(googlesheets) > set.seed(10)
我正在尝试使用 R 自动更新 Google 表格。当我运行 gs_edit_cells() 命令时,出现错误: Error: inherits(ss, "googlesheet") is not TR
使用 googlesheets 包,我试图将 csv 上传到 GDrive 中的特定文件夹。 例子: ## Not run: write.csv(head(iris, 5), "iris.csv",
我最近下载了 googlesheets通过 devtools::install_github("jennybc/googlesheets") 并遇到一些困难。运行脚本时 https://github.
我使用 googlesheets包裹。电子表格的默认目录是 Google Drive 的根目录。我想我可以指定目录 - 就像“普通”目录路径一样 - 但我不知道该怎么做。 gs_new(title =
卡在如何通过 arrayformula 从多行单元格中读取和美化这些值。 我使用正则表达式作为前一行可能会有所不同。 只有公式,没有自定义代码 第一列看起来像一组这样的东西:```[配置]名字 = t
我有以下代码: from oauth2client.service_account import ServiceAccountCredentials from googleapiclient impo
我想知道当特定列发生变化时是否可以触发函数。 当我的 appSheet 在“S”列中添加新行时,我想运行一个函数。 PS:我过去从未使用过触发器函数:/所以我什至不知道如何创建自定义函数。 感谢您的帮
我有2个问题。 如何使用 R 中的 googlesheets 包覆盖现有电子表格中的工作表? 如何使用 R 中的 googlesheets 包在现有电子表格中创建新工作表? 我在 the docume
我们目前正在使用 google 表格进行关于 crowd forecasts for Covid-19 case and death numbers 的研究项目. 使用 Google 表格是为了方便起
我从 google 表格中检索了一张表格并返回了一个列表列表: sheet <- list(var1 = list(Sys.time(), Sys.time(),NULL),
是否可以从包含日期的 Google 表格单元格中获取值并计算另一个单元格自该日期以来在 JavaScript 中过去了多少天? 问题是,当您使用 JavaScript 编写代码时,使用从单元格中获取的
我正在尝试使用 python 3.6.5 使用我机器的当前日期/时间更新 google 工作表中的单元格。我正在使用 gspread 连接到谷歌表格。 如果我执行以下操作,它将给出我希望放入 goog
在 R 中,我们只需使用两行代码就可以读取给定 URL 的私有(private) google 工作表。 library(googlesheets4) manifest <- read_sheet(u
googleAuthR是一个 R 包,它包装了 google API 客户端库(API 的身份验证和进一步使用)。 googlesheets R 包用于与 google 表格 API 集成(即,围绕
我知道还有其他一些类似的问题围绕着 SO(例如 here 和 here ),但我想我会再试一次,因为其他人没有得到很多答案。 我有一个 Shiny 应用程序,允许其用户通过该应用程序提供输入,但这些用
当我从 GoogleSheets 导入时,其中一个变量以列表形式出现。这是一个示例: > dataset$my_date[1:4] [[1]] [1] "2019-06-25 UTC" [[2]] [
我正在尝试使用多个 GoogleSheet 中的数据来生成单个 HighChart 图表。我希望在不将所有数据移至单个电子表格的一个区域的情况下执行此操作,特别是当我想使用向下钻取选项时,这将很难将所
public static String getsheetdata() throws IOException { String name = null; String email =
我目前正在编写一个 python 程序,该程序从网站上抓取数据,然后将该信息写入谷歌电子表格。根据每一行中包含的数据,数据被分成主电子表格内的不同工作表。我一直在使用 gspread 的 batch_
我是一名优秀的程序员,十分优秀!