简体   繁体   English

通过同一电子表格中的其他表格更改Google电子表格中的数据

[英]Alter data in google spreadsheet sheet via other sheet in the same spreadsheet

Question: 题:

Google Spreadsheet is great for viewing/filtering data, and great as DB of applications. Google Spreadsheet非常适合查看/过滤数据,也非常适合作为应用程序数据库。
But is it possible to edit data on a sheet via another sheet? 但是可以通过另一张纸在一张纸上编辑数据吗?

Functional description: 功能说明:

We are a small group (5) non nerd that keep track of tasks we do. 我们是一小群(5)的书呆子,可以跟踪我们所做的任务。 We do this via a google spreadsheet, this works great :) We recieve tasks via the phone and these get added to the sheet1. 我们通过google电子表格来完成此任务,效果很好:)我们通过电话接收任务,这些任务已添加到sheet1中。 When someone pickups a task he/she addes his/her name to the appropriate column in sheet1 of the task (row). 当某人执行任务时,他/她将其姓名添加到任务(行)的sheet1中的相应列中。 We keep track of status updates etc, per task. 我们会跟踪每个任务的状态更新等。

Reason for change: 造成改变的原因:

Sheet1 of this spreadsheet is now to big to get a clear overview of the tasks of 1 person. 现在,此电子表格的Sheet1很大,可以清楚地了解1个人的任务。 So I have 20 tasks in the big spreadsheet, but since ordering is not handy when new tasks are added, it would be nice to have a seperate sheet per person. 因此,我在大型电子表格中有20个任务,但是由于添加新任务时订购不方便,因此每人有一个单独的工作表会很好。 This can easily be done via the query() function. 这可以通过query()函数轻松完成。 But this is a one-way street. 但这是一条单向街。 you can not alter this data and get it back in the main sheet. 您不能更改此数据并将其返回到主表中。 And using sheet1 as a report is also not handy, because how do you add new tasks? 而且,将sheet1用作报告也不方便,因为您如何添加新任务?

Question rephrase: 问题改写:

  1. So is it possible to alter data in the "main" sheet via an subset of the data, available in an other sheet of the same spreadsheet? 那么是否有可能通过同一电子表格的其他工作表中可用的数据子集来更改“主”工作表中的数据?

  2. If not, is it possible to use a google spreadsheet as in interface (read/write/update) to an sqlite database in google app engine ? 如果不是,是否可以在界面(读取/写入/更新)中使用Google电子表格访问Google App Engine中的sqlite数据库?

So is it possible to alter data in the "main" sheet via an subset of the data, available in an other sheet of the same spreadsheet? 那么是否有可能通过同一电子表格的其他工作表中可用的数据子集来更改“主”工作表中的数据?

For a Google Apps Script solution , my fairly general ideas would be: 对于Google Apps脚本解决方案 ,我的一般想法是:

  1. If there isn't a unique identifier for each row in the master sheet, create one. 如果主表中的每一行都没有唯一的标识符,请创建一个。 This could be just a time stamp column, which itself could be automatically generated with an onEdit function. 这可能只是一个时间戳列,它本身可以使用onEdit函数自动生成。

  2. In the viewing sheets, the user would edit information by running a script (perhaps from a custom menu) that will present an input box to edit the active cell. 在查看表中,用户将通过运行脚本(可能来自自定义菜单)来编辑信息,该脚本将显示一个输入框以编辑活动单元格。 But of course when the edit is confirmed, the script will update the appropriate cell in the master sheet, based on the unique identifier; 但是,当然,当确认编辑后,脚本将根据唯一标识符更新母版表中的相应单元格; and your QUERY function will propagate that change back to the viewing sheet. 并且您的QUERY函数会将更改传播回查看表。 (Caveat: with concurrent users viewing the spreadsheet, I have found getting the active cell to be unpredictable, you might need to use a different approach to specify what you want to edit.) (注意:在并发用户查看电子表格的情况下,我发现活动单元是不可预测的,您可能需要使用其他方法来指定要编辑的内容。)

  3. If you wanted to be able to create records from the viewing sheets, rather than navigating to the master sheet and entering them directly, you would probably need a "new record" script as well. 如果您希望能够从查看表中创建记录,而不是导航到母版表并直接输入它们,则可能还需要一个“新记录”脚本。


For a solution using native spreadsheet functions and tools : 对于使用本机电子表格功能和工具的解决方案

There is simply no way of doing the "bidirectional" task exactly as you specified. 根本无法完全按照您指定的方式执行“双向”任务。 You might be able to get a workable solution with the built-in filter tools, however. 但是,您可以使用内置的过滤器工具获得可行的解决方案。

  1. Select the raw data, and click the filter button (or Data, Filter). 选择原始数据,然后单击过滤器按钮(或“数据”,“过滤器”)。 Then using the drop-down arrows that appear, you can filter the data in place to what you are concerned with at the time. 然后,使用出现的下拉箭头,可以将数据过滤到适合您当时所关注的位置。 The advantage is that you can edit the data easily in the familiar spreadsheet interface; 好处是您可以在熟悉的电子表格界面中轻松编辑数据; the disadvantage is that all concurrent viewers see the same filter (that is each user cannot have their own unique filtered view with this method). 缺点是所有并发查看器都可以看到相同的过滤器(也就是说,每个用户使用此方法都不能拥有自己唯一的过滤视图)。

  2. Alternatively, use List View (View, List). 或者,使用列表视图(视图,列表)。 This is a different interface that offers slightly more basic filtering and sorting tools than option 1. However it has a clear advantage that concurrent viewers can filter the data differently to one another. 这是一个不同的界面,与选项1相比,它提供了更多的基本筛选和排序工具。但是,它具有明显的优势,即并发查看器可以彼此不同地筛选数据。 Editing is a bit clunkier (you need to click the Edit button on the left), but still possible. 编辑有点笨拙(您需要单击左侧的“编辑”按钮),但仍然可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM