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
Anil_G
(Anil Gorthi)
January 4, 2023, 1:12pm
2
@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
Anil_G
(Anil Gorthi)
January 4, 2023, 1:25pm
6
@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
Anil_G
(Anil Gorthi)
January 4, 2023, 1:28pm
8
@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
Anil_G
(Anil Gorthi)
January 4, 2023, 1:38pm
10
@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
Hi @prasath_S ,
Thanks for your reply. It works for me. I made mistake to put that image in some other instead of main project folder.
Regards,
Manoj Vijayakumar
Cheers
I dont want it to be added as an attachment. is there a way where i can add it in table only?
Anil_G
(Anil Gorthi)
January 4, 2023, 1:59pm
12
@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
@tomaz
Attach the image as an attachment say the image is text.png
then in body use <img src="text.png">
If writing directly in the body field as string then
"<img src=""text.png"">"
cheers
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