cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rsparks
Helper V
Helper V

Automation only completing 30 loops instead of 120

I have an automation that opens a spreadsheet and reads the data, then in a loop (loop 120 times)(current loop iteration is X):

 

inputs cell A-X into a search bar in a website

clicks a link to download a ZIP

opens the ZIP and puts file in a folder

opens the file and navigates to tab "G 59"

copies data from cell D11 into (initial spreadsheet) cell C-X

copies data from cell D12 into (initial spreadsheet) cell D-X

closes the downloaded spreadsheet and deletes itself

 

For some reason the function starts functioning incorrectly after exactly 30 iterations. It begins just copying blank data to the cells in C-X and D-X.

 

I know that it isn't an issue with the data used to lookup the spreadsheet, nor is the spreadsheet tab "G 59" missing from the downloaded spreadsheets. I know this because I have tried changing the order of the data in column A, and it still bugs out after 30 iterations. Attached are screenshots of the automation:

 

1.PNG

2.PNG

3 REPLIES 3
fraenK
Super User
Super User

Maybe you mixed up the Excel instances/files?

Did you try to debug and look at the content of the variables?

 

@fraenK It seems to be a paste error. It's also interesting that the automation only manages to paste to 60 cells before throwing an error. Previously it was 2 columns and 30 rows, now its 17 columns and it gets through 3.5 rows. 

 

Location: Subflow: Main, Action: Paste cells to Excel worksheet

 

Error message: Failed to paste cells.

 

Error details: Robin.Core.ActionException: Failed to paste cells. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Microsoft Excel cannot paste the data.
--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at Robin.Modules.Excel.Actions.ExcelActions.InvokeMethod(Object o, String methodName, Object[] methodArgs)
at Robin.Modules.Excel.Actions.ExcelActions.PasteCells(Variant excelInstance, Variant firstCellCol, Variant firstCellRow, Int32 pasteMode)
--- End of inner exception stack trace ---
at Robin.Modules.Excel.Actions.PasteCellsToExcel.Execute(ActionContext context)
at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)

 

______________________________________________________________________________

 

Are you able to interpret this? How can I resolve the issue?

 

fraenK
Super User
Super User

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,233)