i have two excel files where i need to perform xlook up from reference file to main file using power automate desktop

i have two excel files where i need to perform xlook up from reference file to main file using power automate desktop
While its doable in Power Automate Desktop, the approach is clunky, atleast the one I came up with.
Using SQL to do these lookups is preferable.
Anyway, here's how to do it:
As there is no formula builder or ready-made formula actions in PAD (atleast for now) you have to build one from scratch.
You could create a subflow called XLOOKUP, then start building the formula in pieces.
The pieces would be as follows:
You will also need to wrap these arguments in parenthesis, and some of the arguments may need some extra text to work at all.
As you can see in the image above, in the second and third argument, you can add the second excel-file if it's a lookup into another sheet/workbook
the final variable you send to a "send keys"-action may look something like this:
you set most/all of the detail-variables before calling the XLOOKUP-subflow and then call the XLOOKUP-subflow to build the correct formula
Finally use the complete formula in a "send keys"-action while in the correct cell and finish with a {Return} to make sure its not getting overwritten by the next action like so
%CurrentFormula%{Return}.
Hope this can guide you to what you want to achieve
Best Regards,
- Thomas Fonn