宏删除旧数据 [英] Macro to delete the old data

查看:63
本文介绍了宏删除旧数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对此我真的很陌生,希望在我目前遇到困难的地方提供一些帮助.我创建了一个宏来清除电子表格.我尝试过onedit和onchange的多个触发因素,但最终目标并没有走运.我正在通过zapier发送数据(在Google表格中大约有10列和100行.基本上,我是通过替换数据来刷新数据的.因此,在数据输入之前,我希望宏删除旧数据.但是,宏实际上会删除它一旦发布就会传入的新数据.是否有任何脚本或变通办法会有所帮助?

I'm really new to this and would love some help where I'm currently stuck. I've created a macro to clear a spreadsheet. I've tried multiple triggers of onedit and onchange and haven't had luck with my end goal. I'm sending data (about 10 columns and 100 rows into a google sheets via zapier. Basically, I'm refreshing the data by replacing the data. So, before the data comes in, I wanted the macro to delete the old data. However, the macro actually deletes the new data coming in once it posts. Any scripts or workarounds that could help?

推荐答案

根据我对Zapier的了解,它可以按时间间隔运行.您可以在Zapier输入信息并删除旧信息之前的时间间隔运行脚本.

From what I know about Zapier it works on timed intervals. You can have a script run on time intervals just before the time Zapier inputs information and delete the old info.

另一种方法可能是使用一个中间工作表.(我们称此工作表为"sheet1".最后一个工作表可以称为"sheet2".当Zapier将数据写入sheet1时,它可以触发onChanged事件.获取信息在sheet2中删除所有内容,然后将新数据发布到工作表2.

Another approach would probably be to have a intermediary sheet.(Lets call this sheet, "sheet1". The final sheet can be called "sheet2". When Zapier writes data to sheet1 it can trigger the onChanged event. Take the information in sheet2 delete everything, then post the new data to sheet 2.

最后,Zapier支持webhooks.您可以将脚本发布为Web应用程序,并对其进行获取或发布到运行删除功能的应用程序中.要给它时间,您可以使用Zapier提供的延迟.

Finally, Zapier supports webhooks. You can publish your script as a web app and have it do a get or post to the app which runs the delete function. To give it time you can use the delay that Zapier provides.

这篇关于宏删除旧数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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