Since you have 7000 rows, my suggestion would be to use a combination of Select Range activity and the keystroke for Insert row.
Basically, you can select every other 2 rows by using an Enumerable method to create a list of ranges to use as the range. Then, Insert Row. After that, you can use Write Cell for each column to write the formula in only the first row (row 4). Finally, use another Select Range to select all cells needing the formula, and use the ctrl+d keystroke to fill down the formulas.
So, I’ll just throw that idea out there for now. I will follow up later with an .xaml file showing how to do that.
You can also instead use Invoke VBA if you have a little knowledge of Excel macros.
If the data is in excel, my suggestion is to write a macro and run it on the file. Looping though 7000 rows, will have a disadvantage of increased processing time.
I provided some in-code documentation to help you navigate code. I also organized it in hopefully a very streamlined way to help with maintainability. And, like I said, if you are processing multiple files, then you can place the Excel actions inside a ForEach, and replace the srcFile variable that I used with what is being referenced to the file in both the Excel scope and the srcSelector variable where I assigned the selector string to concatenate the filename in it for a more dynamic approach.
Note: I forgot to annotate the variables, but the naming is hopefully descriptive enough. Let me know if you have any questions or how to integrate it further.
We discovered that the Range has a limit of 255 characters, so the above approach was not going to work. Instead a Union inside a loop was needed in order to join that many rows together for the range.
I am providing this alternate solution using a .vbscript with the Invoke VBA activity. It’s a more technical solution but does work pretty well since it doesn’t rely on keystroke automation.
As you can see in the screenshot, I am invoking the .vbs file and using the function that I called “InsertFormulas”. I used all the variables in as Parameters to it could execute based on the values that were stored in the workflow.
Let me know if you have any questions on that also.