How to Write Cell

Hey guys so i have 2 columns 1 i add called bot log. The other column is ID what i want to do is if the bot finds there is an exception it will write exception under the bot log beside the ID. How would I do that?

Hi @seanp92,

I’ll suggest you to use try-catch here

  1. Put expected activity or sequence in try section.
  2. Add new catch —> System.Exception
  3. In that catch you can use exception.Message to get what type of exception in you’ve got.
  4. Using write cell with proper range and value as exception.Message.

Note - You can use int variable as a counter for range eg A2. and next exception should be in A3
for that you have to use 1 assign after write cell —> count = count +1

1 Like

can u upload example?

@seanp92
Here’s the example showing how to catch an exception and how to write exception message in Excel

Example.xaml (7.3 KB)

Output —> exception message in excel

1 Like

Workflow,
TryCatchUpdate.xaml (9.2 KB)