Google Spreadsheet数据透视表范围更新使用脚本 [英] Google Spreadsheet Pivot Table Range Update Using Scripts

查看:588
本文介绍了Google Spreadsheet数据透视表范围更新使用脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用脚本编辑Google文档电子表格中数据透视表的数据范围?



或...



是否可以为数据透视表范围使用命名范围?

解决方案

不幸的是,时间(2012年7月31日),我相信答案是你不能和不。 : - (

我可以建议的唯一解决方法是:1.使用QUERY电子表格函数,该函数支持可容纳增长数据的开放式范围,以生成表格,或者2.使用Google Apps脚本本身来生成表格,两者都需要比只使用脚本修改源数据范围更加费力(如使用Excel / VBA一样)另一方面,一般实现GSheets中的Pivot Tables的表格仍然有点bug,所以可能有争议的是,您可能想要探索其他选项之一。


How do I edit the Data Range of a Pivot Table in A Google Docs Spreadsheet with a script?

Or...

Is it possible to use a named range for a Pivot Table range?

解决方案

Unfortunately, at this time (31 July 2012), I believe the answers are "you can't" and "no". :-(

The only workarounds I can suggest are: 1. use the QUERY spreadsheet function, which supports open-ended ranges that will accommodate growing data, to generate the table, or 2. use Google Apps Script itself to generate the table. Both of which require more effort than if you could just modify the source data ranges with script (like you can with Excel/VBA). On the other hand, the general implementation of Pivot Tables in GSheets is still a bit buggy, so it's arguable that you might want to explore one of the other options for this reason.

这篇关于Google Spreadsheet数据透视表范围更新使用脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆