Academy Foundation Training Lesson 9 - Excel and Datatables Runtime Exception being thrown

Hello,

I am currently working through the UiPath Academy foundation training (revamped) series and am running into issues on Lesson 9. I’m following along with the video but frequently keep having exceptions thrown when I execute the workflow as provided by the trainer.

For reference I’m running Windows 10 Pro, MS Office 365 Business, and UiPath Community Edition 2018.3.0.

I am currently about halfway through the “Basic Interactions” video where the user is being shown how to use the the Append Range activity from the Excel Activities set. My issues is that the runtime keeps panicking at the Write Range activity in the execution flow. I’ve been able to get the first parts of this lesson to work, but it’s hit or miss. If I restart my computer and recreate it from scratch, it executes correctly the first time. On subsequent attempts I get a Runtime execution error with a Source: Write Range and Exception Type: UiPath.Excel.ExcelException. The stack trace doesn’t provide any helpful info beyond that it fails on that Write Range function call.

I’ve gone through deleting the target file and changing the scope of my variables to global, as well as playing with the options for both Read Range and Write Range. I updated my packages to the latest version as far as I can tell, and have updated my copy of Excel to the latest version. If I set both Excel Application Scopes to not visible, I get some sort of type casting exception:

image

Does anybody have any insight? While the video series is great, it’s been somewhat discouraging as I’ve run into multiple exceptions for different units in the training so far, even when I duplicate the trainer’s workflow’s to a T. We are strongly considering this RPA platform for enterprise adoption—I even have C-level buy-in already— but if this basic functionality throws exceptions in the Enterprise version it would be a deal breaker for our company.

I’m also getting this error from time to time:

image

So I think I solved my own problem. According to some on the forums, UiPath Runtime is executing too fast for initializing multiple instances of Excel in sequence. Adding a delay seems to work, see this post:

Instead of implementing Write Line I add a Delay Activity from the Workflow.Control activities set. If I start fresh I can get it execute without exceptions at Delay.Misc.Duration = TimeSpan.FromMilliseconds(050).
If I execute it again without deleting the newly created spreadsheet, it throws a runtime error with Write Range. If I increase TimeSpan.FromMilliseconds to (100) or (250), it seems to not complain–even when overwriting the existing created file! :grinning:

1 Like