How to add image to datable

hi,
i have built a datatable where it has a column as
screenshot with datatype as image. in my process i am taking a screenshot and passing it to add data row and sending it in email as html body format. but i m getting error while adding it to add data row.

kindly help me to resolve the issue

@sneha_arbole1

Can you try like this in add data row

New Object() {Value1,Imageval}

If this is not the issue can you please show what you tried and what error you are getting

cheers

i have not added new object() before {Value1,Imageval}. i will try with your suggestion

1 Like

Tried with above solution but its not working. it is not even throwing error
image

@sneha_arbole1

Can you please run in debug mode and show what error it is showing please from locals panel you can check the inner exception as well

Are you trying to write data to excel?

if yes then by default datatable will be converted to string it wont use image type

cheers

i have debugged it and i am not getting any error for add data row activity
No i am not trying to write it to excel. I am passing this data table to email body

@sneha_arbole1

Are you trying to write the data to excel?

if yes then datatable will not write image to excel…it will write a type string …that is the reason you are seeing uiapth.core.image

cheers

i am not trying to write it to excel. I am passing this data table to email body

@sneha_arbole1

If you need to insert into email then you have to attach the image to email and give the pth of image using img tag and the image would be displayed…

The body is to be in html

Please check this

Cheers

I dont want it to be added as an attachment. is there a way where i can add it in table only?

@sneha_arbole1

It will display that in the cell only…But for it to display you have to attachment and give the path in img tag

Now in your add datarow instead of passing image…you will pass the filename enclosed in image tag and attach the file in attachments

cheers