我对Power Automate非常陌生,所以我可能会以完全错误的方式进行。
目前我使用的是'当文件被创建或修改触发器'。但我需要更多的手动操作。用户需要能够双重检查信息,然后手动关闭流程。
最好是个纽扣。但我了解到的是,有问题的流不适用于.xlsm文件,所以我已经使用Power Query将数据从file1.xlsm移动到file2.xlsx,然后Power Automate能够从file2.xlsx选择数据。作为一个自动化的过程,这是工作正常。我可以使用file1.xlsm中的宏打开file2.xlsx,刷新查询,然后流将自动触发。
但是现在我需要能够手动打开file2.xlsx,仔细检查数据,并在启动流之前根据需要进行更改。
我曾经尝试过使用一个按钮以某种方式更改单元格中的值(类似于复选框,但它似乎不是一个带有按钮的选项),然后将其用作power automate的触发器(尽管我不确定这是否可能)。
我想我应该在这里问一下,是否有人知道任何我没有想到的非常明显的选择。我觉得这应该是一个相当标准的excel /自动化功能,我错过了一些明显的东西。
2条答案
按热度按时间kjthegm61#
是的,您可以从电子表格中的按钮运行Power Automate中的流,而无需使用VBA。Power Automate提供了多种触发流的方法,包括与Microsoft Excel的集成。以下是实现此目标的方法:
现在,当您打开电子表格时,您将看到Power Automate加载项添加的按钮。单击该按钮将触发Power Automate中的关联流,执行流中定义的操作和逻辑。
此方法允许您直接从Excel界面触发流,而无需VBA代码。
kuarbcqp2#
有几种方法可以解决这个问题。你最终会走的路完全取决于你。
Office脚本
https://learn.microsoft.com/en-us/office/dev/scripts/overview/excel
在这个框架中,您可以添加一个按钮,然后执行一个特定的功能,该功能可以执行您想要的操作并在字段中设置一个值。
您需要检查相关的范围值,以确定是否继续执行PA流,然后将该字段设置回另一个值,该值将为用户群的每一个其他后续更改关闭触发器。
这是最好的选择吗可能没有,但你问了,所以我想给予你一些可能的见解。
PowerAutomate按钮
与其使用修改后的文件触发器,为什么不创建一个通过按钮(
Manually trigger a flow
操作)触发的流呢?这允许对流动的运行进行完全控制。该按钮只能分配给您自己,因此只有您能够运行它。如果你想把它分配给其他人,你也可以这样做。
底线是,这将是你的按钮推。你不会从Excel中做,你只是从PA中做。它也可以很容易地从移动的应用程序访问。
对我来说,这将是更明显的方法。