Need to store Exception message in Datatable

Hi All,

I am using excel file as input data, when input is not as expected it shows error in catch block.
I would to like store exceptions in New Datatable(Using Build data table) in catch block instead of throwing an error message. Kindly help me with steps and also exception needs to save in corresponding cell in excel file.


Thanks in advance!!
Pavan.

Hi @Pavan_kumar15 ,

Please refer to the attached sample flow where I have caught the exception in the catch block and written it in Excel. This needs to be extrapolated in the sense, that you need to create a data table using Build Data table activity at the start and keep Adding rows to it in all exception blocks.
at the end of the process, you need to use the ‘Write data table to excel’ activity.

ExceptioninExcel.zip (10.6 KB)

I have created a sample case.Let me know if you need any further help.

Happy Automating…!

Thanks,
Gautham.

Hi @Gautham_Pattabiraman ,

I have followed your steps but it is throwing below error. can you please check.

Thanks in advance!!
Pavan.

Hi @Pavan_kumar15 ,

Could you please share the snap of data table you are building from build data table activity.?

Thanks,
Gautham.

@Pavan_kumar15 The error says that the cell couldn’t accommodate large text in it. Make sure ‘Max Length’ of the column is set to ‘-1’. This option will be available in Build data table Activity.

1 Like

Hi @Pavan_kumar15 ,

Please Check the way I configured the data table and How I have initiated the instance of Add row activity in the workflow I have attached for sample. Try Following the same and let me know if you still have the issue.

Hope it helps you out.! Happy Automating.!!

Thanks,
Gautham.

Thanks @Gautham_Pattabiraman
This worked, thanks for your inputs

1 Like

Thanks @Balaram_Prasad
It helped me, thanks for your inputs.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.